dekshell 0.2.33__py3-none-any.whl → 0.2.35__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 +14 -10
- dekshell/core/contexts/properties.py +10 -0
- {dekshell-0.2.33.dist-info → dekshell-0.2.35.dist-info}/METADATA +1 -1
- {dekshell-0.2.33.dist-info → dekshell-0.2.35.dist-info}/RECORD +6 -6
- {dekshell-0.2.33.dist-info → dekshell-0.2.35.dist-info}/WHEEL +0 -0
- {dekshell-0.2.33.dist-info → dekshell-0.2.35.dist-info}/entry_points.txt +0 -0
|
@@ -15,7 +15,7 @@ from dektools.file import sure_dir, write_file, read_text, remove_path, sure_par
|
|
|
15
15
|
read_lines, seek_py_module_path, come_real_path, status_of_dir, diff_of_dir, path_parent, \
|
|
16
16
|
split_file, combine_split_files, remove_split_files, meta_split_file, tree, iglob, \
|
|
17
17
|
iter_dir_type, iter_dir_type_one, \
|
|
18
|
-
where,
|
|
18
|
+
where, which, those
|
|
19
19
|
from dektools.hash import hash_file
|
|
20
20
|
from dektools.zip import compress_files, decompress_files
|
|
21
21
|
from dektools.output import pprint, obj2str
|
|
@@ -23,9 +23,9 @@ from dektools.net import get_available_port
|
|
|
23
23
|
from dektools.func import FuncAnyArgs
|
|
24
24
|
from dektools.fetch import download_file, download_content
|
|
25
25
|
from dektools.download import download_from_http
|
|
26
|
-
from dektools.ps.process import process_detail,
|
|
26
|
+
from dektools.ps.process import process_print_all, process_print_detail, process_detail, process_query, process_username
|
|
27
27
|
from dektools.time import now
|
|
28
|
-
from dektools.str import shlex_split, shlex_quote
|
|
28
|
+
from dektools.str import shlex_split, shlex_quote, str_split, split_table_line
|
|
29
29
|
from dektools.format import format_duration
|
|
30
30
|
from dektools.shell import shell_wrapper, is_user_admin, shell_timeout, shell_retry
|
|
31
31
|
from dektools.match import GeneralMatcher, glob2re, glob_compile, glob_match
|
|
@@ -218,10 +218,9 @@ def _time_mark(begin=True, name=None):
|
|
|
218
218
|
path_common_methods = {
|
|
219
219
|
'cd': _cd,
|
|
220
220
|
'cwd': lambda: os.getcwd(),
|
|
221
|
-
'
|
|
222
|
-
'
|
|
223
|
-
'
|
|
224
|
-
'where_list': where_list,
|
|
221
|
+
'where': where,
|
|
222
|
+
'which': lambda *x, **y: which(*x, **y) or '',
|
|
223
|
+
'those': those,
|
|
225
224
|
'pybin': lambda x, p=None: search_bin_by_path_tree(p or os.getcwd(), x, False),
|
|
226
225
|
'pym': _pym,
|
|
227
226
|
'pymd': _pymd,
|
|
@@ -242,6 +241,10 @@ default_methods = {
|
|
|
242
241
|
'getpass': getpass.getpass,
|
|
243
242
|
'install': _install,
|
|
244
243
|
'Path': Path,
|
|
244
|
+
'split': {
|
|
245
|
+
'str': lambda x, y=None: str_split(x, y),
|
|
246
|
+
'tab': split_table_line,
|
|
247
|
+
},
|
|
245
248
|
'sh': {
|
|
246
249
|
'admin': is_user_admin,
|
|
247
250
|
'timeout': shell_timeout,
|
|
@@ -301,9 +304,10 @@ default_methods = {
|
|
|
301
304
|
'end': lambda name=None: _time_mark(False, name),
|
|
302
305
|
},
|
|
303
306
|
'pu': {
|
|
304
|
-
'ps':
|
|
305
|
-
'
|
|
306
|
-
'
|
|
307
|
+
'ps': process_print_all,
|
|
308
|
+
'pd': process_print_detail,
|
|
309
|
+
'detail': process_detail,
|
|
310
|
+
'query': lambda x: list(process_query(x)),
|
|
307
311
|
},
|
|
308
312
|
|
|
309
313
|
'sys': {
|
|
@@ -4,6 +4,7 @@ import shutil
|
|
|
4
4
|
import tempfile
|
|
5
5
|
import sysconfig
|
|
6
6
|
import platform
|
|
7
|
+
import getpass
|
|
7
8
|
from pathlib import Path
|
|
8
9
|
from sysconfig import get_paths
|
|
9
10
|
from importlib import metadata
|
|
@@ -12,6 +13,8 @@ from dektools.module import ModuleProxy
|
|
|
12
13
|
from dektools.time import DateTime
|
|
13
14
|
from dektools.file import read_text
|
|
14
15
|
from dektools.env import is_on_cicd
|
|
16
|
+
from dektools.ps.process import process_attrs
|
|
17
|
+
from dektools.extraction.filter.utils import Method, MethodSimple, AttrProxy
|
|
15
18
|
from ...utils.serializer import serializer
|
|
16
19
|
from ..redirect import shell_name
|
|
17
20
|
from ..markers.base.core import get_inner_vars
|
|
@@ -82,6 +85,7 @@ default_properties = {
|
|
|
82
85
|
'pid': os.getpid(),
|
|
83
86
|
'ps': os.pathsep,
|
|
84
87
|
'cicd': is_on_cicd(),
|
|
88
|
+
'username': getpass.getuser(),
|
|
85
89
|
},
|
|
86
90
|
'platform': {
|
|
87
91
|
'cygwin': sys.platform == 'cygwin',
|
|
@@ -100,9 +104,15 @@ default_properties = {
|
|
|
100
104
|
'temp': Path(tempfile.gettempdir()),
|
|
101
105
|
'sep': os.sep
|
|
102
106
|
},
|
|
107
|
+
'pu': {
|
|
108
|
+
'attrs': process_attrs
|
|
109
|
+
},
|
|
103
110
|
'obj': serializer,
|
|
104
111
|
'mp': ModuleProxy(),
|
|
105
112
|
'date': DateTime(),
|
|
106
113
|
'env': _Env(),
|
|
107
114
|
'envs': _EnvS(),
|
|
115
|
+
'm': Method(),
|
|
116
|
+
'mm': MethodSimple(),
|
|
117
|
+
'a': AttrProxy(),
|
|
108
118
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
dekshell-0.2.
|
|
2
|
-
dekshell-0.2.
|
|
3
|
-
dekshell-0.2.
|
|
1
|
+
dekshell-0.2.35.dist-info/METADATA,sha256=hDvwRVi1ZNokJ-7ORpier5GMGRIADdI1qi8DJyFoU5c,573
|
|
2
|
+
dekshell-0.2.35.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
|
|
3
|
+
dekshell-0.2.35.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=r-AHdO9CEEVvTN20-8Jozr6Zh8XSv_BnktYRwrlhtrE,2046
|
|
7
7
|
dekshell/core/__init__.py,sha256=isDEKwk1odLdvTQNCILCtVNBuXp1uFVPz_uTDNihkVU,5547
|
|
8
8
|
dekshell/core/contexts/__init__.py,sha256=ynsfv37azOKfI2UKd0iPl2M6iBW-k5cb1BqSLOWuJpI,482
|
|
9
|
-
dekshell/core/contexts/methods.py,sha256=
|
|
10
|
-
dekshell/core/contexts/properties.py,sha256=
|
|
9
|
+
dekshell/core/contexts/methods.py,sha256=KxCVtJV3NXFKuCB-MYnQ2EJgFoegRwx5gtTGsmN-64g,10548
|
|
10
|
+
dekshell/core/contexts/properties.py,sha256=R6TBvQAH4IIkLZV8wfroUXguy9cxYsKmPEE_FCV2dA8,3417
|
|
11
11
|
dekshell/core/markers/__init__.py,sha256=yRQazZ1dxMltFao_RQnDnawSnQcjN_4B930MjJhaZ40,1968
|
|
12
12
|
dekshell/core/markers/base/__init__.py,sha256=W5f_Mcn9MLM8kOVqu05NUaDpn3xUNURe_NYerUoH6Js,16021
|
|
13
13
|
dekshell/core/markers/base/core.py,sha256=InsUA3md2gC6GyXQsvARfeNTrfbVD3gGOYxTM8VqqPA,11679
|
|
@@ -37,4 +37,4 @@ dekshell/utils/cmd.py,sha256=K9FbXgHcGFchHA58xI0_t4YK4yb8XkWbxsNoztYRx3Y,518
|
|
|
37
37
|
dekshell/utils/pkg.py,sha256=TgYqRqawoJfjkxt6UAHnp9ttmpjuHiWRFbqxADOS1VE,1337
|
|
38
38
|
dekshell/utils/serializer.py,sha256=aIdF2Wzo-qHmIshv46jn1XD0X66vQ1JFdU-g3ZFbH2w,386
|
|
39
39
|
dekshell/utils/shell.py,sha256=0NoA2-SOOMinbmZZipwzL-npBbzPOdWEfdPVYqq5G5g,92
|
|
40
|
-
dekshell-0.2.
|
|
40
|
+
dekshell-0.2.35.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|