multiCMD 1.31__py3-none-any.whl → 1.33__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.
- multiCMD.py +8 -5
- {multicmd-1.31.dist-info → multicmd-1.33.dist-info}/METADATA +1 -1
- multicmd-1.33.dist-info/RECORD +6 -0
- multicmd-1.31.dist-info/RECORD +0 -6
- {multicmd-1.31.dist-info → multicmd-1.33.dist-info}/WHEEL +0 -0
- {multicmd-1.31.dist-info → multicmd-1.33.dist-info}/entry_points.txt +0 -0
- {multicmd-1.31.dist-info → multicmd-1.33.dist-info}/top_level.txt +0 -0
multiCMD.py
CHANGED
@@ -18,10 +18,10 @@ import re
|
|
18
18
|
import itertools
|
19
19
|
import signal
|
20
20
|
|
21
|
-
version = '1.
|
21
|
+
version = '1.33'
|
22
22
|
__version__ = version
|
23
23
|
|
24
|
-
__running_threads =
|
24
|
+
__running_threads = set()
|
25
25
|
__variables = {}
|
26
26
|
class Task:
|
27
27
|
def __init__(self, command):
|
@@ -232,7 +232,7 @@ _BRACKET_RX = re.compile(r'\[([^\]]+)\]')
|
|
232
232
|
_ALPHANUM = string.digits + string.ascii_letters
|
233
233
|
_ALPHA_IDX = {c: i for i, c in enumerate(_ALPHANUM)}
|
234
234
|
|
235
|
-
def _expand_piece(piece
|
235
|
+
def _expand_piece(piece, vars_):
|
236
236
|
"""Turn one comma-separated element from inside [...] into a list of strings."""
|
237
237
|
piece = piece.strip()
|
238
238
|
|
@@ -267,7 +267,7 @@ def _expand_piece(piece: str, vars_: dict[str, str]) -> list[str]:
|
|
267
267
|
# plain token or ${var}
|
268
268
|
return [vars_.get(piece, piece)]
|
269
269
|
|
270
|
-
def _expand_ranges_fast(inStr
|
270
|
+
def _expand_ranges_fast(inStr):
|
271
271
|
global __variables
|
272
272
|
segments: list[list[str]] = []
|
273
273
|
pos = 0
|
@@ -662,7 +662,7 @@ def run_commands(commands, timeout=0,max_threads=1,quiet=False,dry_run=False,wit
|
|
662
662
|
for thread in threads:
|
663
663
|
thread.join()
|
664
664
|
else:
|
665
|
-
__running_threads.
|
665
|
+
__running_threads.update(threads)
|
666
666
|
else:
|
667
667
|
# just process the commands sequentially
|
668
668
|
sem = threading.Semaphore(1)
|
@@ -689,8 +689,11 @@ def join_threads(threads=__running_threads,timeout=None):
|
|
689
689
|
@returns:
|
690
690
|
None
|
691
691
|
'''
|
692
|
+
global __running_threads
|
692
693
|
for thread in threads:
|
693
694
|
thread.join(timeout=timeout)
|
695
|
+
if threads is __running_threads:
|
696
|
+
__running_threads = {t for t in threads if t.is_alive()}
|
694
697
|
|
695
698
|
def input_with_timeout_and_countdown(timeout, prompt='Please enter your selection'):
|
696
699
|
"""
|
@@ -0,0 +1,6 @@
|
|
1
|
+
multiCMD.py,sha256=Sp3gMwko1syiZBabw107p5louNFO8OX2JNWESBM5OWs,28064
|
2
|
+
multicmd-1.33.dist-info/METADATA,sha256=ZfpSMhgLYdCibszPzykGLC1G--J0QBazLiEsp8AgkMg,5640
|
3
|
+
multicmd-1.33.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
4
|
+
multicmd-1.33.dist-info/entry_points.txt,sha256=nSLBkYrcUCQxt1w3LIJkvgOhpRYEC0xAPqNG7u4OYs8,89
|
5
|
+
multicmd-1.33.dist-info/top_level.txt,sha256=DSqgftD40G09F3qEjpHRCUNUsGUvGZZG69Sm3YEUiWI,9
|
6
|
+
multicmd-1.33.dist-info/RECORD,,
|
multicmd-1.31.dist-info/RECORD
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
multiCMD.py,sha256=H_jetcGuVpIsaBvCvMEcHaoAEK0XNtDPO705Arb1LgE,27994
|
2
|
-
multicmd-1.31.dist-info/METADATA,sha256=xa3SHJ-2Z_hvE3ePlbQiwzfrsDnKLT8tfOXAQeoHp6I,5640
|
3
|
-
multicmd-1.31.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
4
|
-
multicmd-1.31.dist-info/entry_points.txt,sha256=nSLBkYrcUCQxt1w3LIJkvgOhpRYEC0xAPqNG7u4OYs8,89
|
5
|
-
multicmd-1.31.dist-info/top_level.txt,sha256=DSqgftD40G09F3qEjpHRCUNUsGUvGZZG69Sm3YEUiWI,9
|
6
|
-
multicmd-1.31.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|