dekshell 0.2.13__py3-none-any.whl → 0.2.15__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dekshell/core/contexts/methods.py +19 -0
- {dekshell-0.2.13.dist-info → dekshell-0.2.15.dist-info}/METADATA +1 -1
- {dekshell-0.2.13.dist-info → dekshell-0.2.15.dist-info}/RECORD +5 -5
- {dekshell-0.2.13.dist-info → dekshell-0.2.15.dist-info}/WHEEL +0 -0
- {dekshell-0.2.13.dist-info → dekshell-0.2.15.dist-info}/entry_points.txt +0 -0
|
@@ -3,6 +3,7 @@ import shutil
|
|
|
3
3
|
import sys
|
|
4
4
|
import tempfile
|
|
5
5
|
import getpass
|
|
6
|
+
from importlib import import_module
|
|
6
7
|
from functools import reduce
|
|
7
8
|
from itertools import chain
|
|
8
9
|
from pathlib import Path
|
|
@@ -141,10 +142,26 @@ def _io(x=None):
|
|
|
141
142
|
def _cd(path=None):
|
|
142
143
|
if path is None:
|
|
143
144
|
path = os.path.expanduser('~')
|
|
145
|
+
sure_dir(path)
|
|
144
146
|
os.chdir(path)
|
|
145
147
|
return path
|
|
146
148
|
|
|
147
149
|
|
|
150
|
+
def _pym(name):
|
|
151
|
+
try:
|
|
152
|
+
m = import_module(name)
|
|
153
|
+
return m.__file__
|
|
154
|
+
except ImportError:
|
|
155
|
+
return None
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
def _pymd(name):
|
|
159
|
+
r = _pym(name)
|
|
160
|
+
if r:
|
|
161
|
+
return os.path.dirname(r)
|
|
162
|
+
return None
|
|
163
|
+
|
|
164
|
+
|
|
148
165
|
path_common_methods = {
|
|
149
166
|
'cd': _cd,
|
|
150
167
|
'cwd': lambda: os.getcwd(),
|
|
@@ -153,6 +170,8 @@ path_common_methods = {
|
|
|
153
170
|
'which_list': which_list,
|
|
154
171
|
'where_list': where_list,
|
|
155
172
|
'pybin': lambda x, p=None: search_bin_by_path_tree(p or os.getcwd(), x, False),
|
|
173
|
+
'pym': _pym,
|
|
174
|
+
'pymd': _pymd
|
|
156
175
|
}
|
|
157
176
|
|
|
158
177
|
default_methods = {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
dekshell-0.2.
|
|
2
|
-
dekshell-0.2.
|
|
3
|
-
dekshell-0.2.
|
|
1
|
+
dekshell-0.2.15.dist-info/METADATA,sha256=STt5dV7O8qGWuSz0MBwN4TXK-f28sAlEY1tsf98ex9w,573
|
|
2
|
+
dekshell-0.2.15.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
|
|
3
|
+
dekshell-0.2.15.dist-info/entry_points.txt,sha256=d-kbfULiUTZWIBBsrQF3J_-wESncF-4K2rwHT08grlI,75
|
|
4
4
|
dekshell/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
dekshell/click/__entry__.py,sha256=CMuxUzXoEe4TcHFZwv-MNFwHnu1HSZCDpXFpqQ814uM,42
|
|
6
6
|
dekshell/click/__init__.py,sha256=rFzB_exzPQaIcbbms5PdHAU3NGdl2MBaYbq9v7g7BOI,1870
|
|
7
7
|
dekshell/core/__init__.py,sha256=ZAJtMPFCVClHCPkoP5rmTq1vVLLMQRa8MP-QJXLBgNM,5337
|
|
8
8
|
dekshell/core/contexts/__init__.py,sha256=ynsfv37azOKfI2UKd0iPl2M6iBW-k5cb1BqSLOWuJpI,482
|
|
9
|
-
dekshell/core/contexts/methods.py,sha256=
|
|
9
|
+
dekshell/core/contexts/methods.py,sha256=9NV0x_N8xU7hlmx0apwDYV7GBhsD28Hw9PWyM6FgUrg,8047
|
|
10
10
|
dekshell/core/contexts/properties.py,sha256=esr51c6wDTDsuFXF2uj7WfyIGSq9H0dzqDqWzeMTNQE,2382
|
|
11
11
|
dekshell/core/markers/__init__.py,sha256=FyVfsvt1c8hFWoTgHuMriSJvrJg1XulK636Kt1TczjQ,1867
|
|
12
12
|
dekshell/core/markers/base/__init__.py,sha256=To25RVX3h1MluV3OmktVMw2bigex79GjWHUPWtIlczI,13433
|
|
@@ -36,4 +36,4 @@ dekshell/utils/cmd.py,sha256=FfWNRRRdiiTs3xoXvaAyZ-3OzsWFRnd3m5k6sIexrhc,1209
|
|
|
36
36
|
dekshell/utils/pkg.py,sha256=TgYqRqawoJfjkxt6UAHnp9ttmpjuHiWRFbqxADOS1VE,1337
|
|
37
37
|
dekshell/utils/serializer.py,sha256=aIdF2Wzo-qHmIshv46jn1XD0X66vQ1JFdU-g3ZFbH2w,386
|
|
38
38
|
dekshell/utils/shell.py,sha256=0NoA2-SOOMinbmZZipwzL-npBbzPOdWEfdPVYqq5G5g,92
|
|
39
|
-
dekshell-0.2.
|
|
39
|
+
dekshell-0.2.15.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|