multiCMD 1.19__tar.gz → 1.20__tar.gz
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-1.19 → multicmd-1.20}/PKG-INFO +12 -19
- {multicmd-1.19 → multicmd-1.20}/README.md +11 -18
- {multicmd-1.19 → multicmd-1.20}/multiCMD.egg-info/PKG-INFO +12 -19
- {multicmd-1.19 → multicmd-1.20}/multiCMD.py +2 -2
- {multicmd-1.19 → multicmd-1.20}/multiCMD.egg-info/SOURCES.txt +0 -0
- {multicmd-1.19 → multicmd-1.20}/multiCMD.egg-info/dependency_links.txt +0 -0
- {multicmd-1.19 → multicmd-1.20}/multiCMD.egg-info/entry_points.txt +0 -0
- {multicmd-1.19 → multicmd-1.20}/multiCMD.egg-info/requires.txt +0 -0
- {multicmd-1.19 → multicmd-1.20}/multiCMD.egg-info/top_level.txt +0 -0
- {multicmd-1.19 → multicmd-1.20}/setup.cfg +0 -0
- {multicmd-1.19 → multicmd-1.20}/setup.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: multiCMD
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.20
|
4
4
|
Summary: Run commands simultaneously
|
5
5
|
Home-page: https://github.com/yufei-pan/multiCMD
|
6
6
|
Author: Yufei Pan
|
@@ -25,31 +25,24 @@ Dynamic: requires-python
|
|
25
25
|
Dynamic: summary
|
26
26
|
|
27
27
|
# multiCMD
|
28
|
-
A simple script that is able to issue multiple commands and execute them at the same time locally.
|
29
|
-
|
30
|
-
multiCMD can display realtime-ish outputs in color if running multiple commands at the same time.
|
31
|
-
|
32
|
-
Can be used in bash scripts for automation actions.
|
33
|
-
|
34
|
-
Also able to be imported and act as a wrapper for subprocess.
|
35
28
|
|
36
|
-
|
37
|
-
|
38
|
-
Use quiet=True and wait_for_return=False to create a daemon thread that async updates the return list / objects when return comes
|
39
|
-
|
40
|
-
For each process, it will initialize a thread if using -m/--max_threads > 1
|
29
|
+
A simple script that is able to issue multiple commands and execute them at the same time locally.
|
41
30
|
|
42
|
-
|
31
|
+
`multiCMD` can display realtime-ish outputs in color if running multiple commands at the same time.
|
43
32
|
|
44
|
-
|
33
|
+
It can be used in bash scripts for automation actions, and it can also be imported and act as a wrapper for `subprocess`.
|
45
34
|
|
46
|
-
|
35
|
+
- Use `return_object=True` with `run_commands` or `run_command` to get the Task Object (definition below).
|
36
|
+
- Use `quiet=True` and `wait_for_return=False` to create a daemon thread that asynchronously updates the return list / objects when commands finish.
|
47
37
|
|
48
|
-
|
38
|
+
For each process, a thread will be initialized if using `-m/--max_threads > 1`.
|
39
|
+
For each thread, `subprocess` is used to open a process for the command task.
|
40
|
+
Two additional threads are opened for processing input and output for the task.
|
49
41
|
|
50
|
-
|
42
|
+
The input / output threads are non-blocking.
|
43
|
+
Thus, using `-t/--timeout` will work more reliably.
|
51
44
|
|
52
|
-
An output line is considered committed if
|
45
|
+
**Note:** `timeout` specifies how many seconds `multiCMD` will wait before killing the command if **no committed output** was detected for this duration. An output line is considered committed if the **stream handler** encounters a `\n` or `\r` character.
|
53
46
|
|
54
47
|
|
55
48
|
Install via
|
@@ -1,29 +1,22 @@
|
|
1
1
|
# multiCMD
|
2
|
-
A simple script that is able to issue multiple commands and execute them at the same time locally.
|
3
|
-
|
4
|
-
multiCMD can display realtime-ish outputs in color if running multiple commands at the same time.
|
5
|
-
|
6
|
-
Can be used in bash scripts for automation actions.
|
7
|
-
|
8
|
-
Also able to be imported and act as a wrapper for subprocess.
|
9
2
|
|
10
|
-
|
11
|
-
|
12
|
-
Use quiet=True and wait_for_return=False to create a daemon thread that async updates the return list / objects when return comes
|
13
|
-
|
14
|
-
For each process, it will initialize a thread if using -m/--max_threads > 1
|
3
|
+
A simple script that is able to issue multiple commands and execute them at the same time locally.
|
15
4
|
|
16
|
-
|
5
|
+
`multiCMD` can display realtime-ish outputs in color if running multiple commands at the same time.
|
17
6
|
|
18
|
-
|
7
|
+
It can be used in bash scripts for automation actions, and it can also be imported and act as a wrapper for `subprocess`.
|
19
8
|
|
20
|
-
|
9
|
+
- Use `return_object=True` with `run_commands` or `run_command` to get the Task Object (definition below).
|
10
|
+
- Use `quiet=True` and `wait_for_return=False` to create a daemon thread that asynchronously updates the return list / objects when commands finish.
|
21
11
|
|
22
|
-
|
12
|
+
For each process, a thread will be initialized if using `-m/--max_threads > 1`.
|
13
|
+
For each thread, `subprocess` is used to open a process for the command task.
|
14
|
+
Two additional threads are opened for processing input and output for the task.
|
23
15
|
|
24
|
-
|
16
|
+
The input / output threads are non-blocking.
|
17
|
+
Thus, using `-t/--timeout` will work more reliably.
|
25
18
|
|
26
|
-
An output line is considered committed if
|
19
|
+
**Note:** `timeout` specifies how many seconds `multiCMD` will wait before killing the command if **no committed output** was detected for this duration. An output line is considered committed if the **stream handler** encounters a `\n` or `\r` character.
|
27
20
|
|
28
21
|
|
29
22
|
Install via
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: multiCMD
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.20
|
4
4
|
Summary: Run commands simultaneously
|
5
5
|
Home-page: https://github.com/yufei-pan/multiCMD
|
6
6
|
Author: Yufei Pan
|
@@ -25,31 +25,24 @@ Dynamic: requires-python
|
|
25
25
|
Dynamic: summary
|
26
26
|
|
27
27
|
# multiCMD
|
28
|
-
A simple script that is able to issue multiple commands and execute them at the same time locally.
|
29
|
-
|
30
|
-
multiCMD can display realtime-ish outputs in color if running multiple commands at the same time.
|
31
|
-
|
32
|
-
Can be used in bash scripts for automation actions.
|
33
|
-
|
34
|
-
Also able to be imported and act as a wrapper for subprocess.
|
35
28
|
|
36
|
-
|
37
|
-
|
38
|
-
Use quiet=True and wait_for_return=False to create a daemon thread that async updates the return list / objects when return comes
|
39
|
-
|
40
|
-
For each process, it will initialize a thread if using -m/--max_threads > 1
|
29
|
+
A simple script that is able to issue multiple commands and execute them at the same time locally.
|
41
30
|
|
42
|
-
|
31
|
+
`multiCMD` can display realtime-ish outputs in color if running multiple commands at the same time.
|
43
32
|
|
44
|
-
|
33
|
+
It can be used in bash scripts for automation actions, and it can also be imported and act as a wrapper for `subprocess`.
|
45
34
|
|
46
|
-
|
35
|
+
- Use `return_object=True` with `run_commands` or `run_command` to get the Task Object (definition below).
|
36
|
+
- Use `quiet=True` and `wait_for_return=False` to create a daemon thread that asynchronously updates the return list / objects when commands finish.
|
47
37
|
|
48
|
-
|
38
|
+
For each process, a thread will be initialized if using `-m/--max_threads > 1`.
|
39
|
+
For each thread, `subprocess` is used to open a process for the command task.
|
40
|
+
Two additional threads are opened for processing input and output for the task.
|
49
41
|
|
50
|
-
|
42
|
+
The input / output threads are non-blocking.
|
43
|
+
Thus, using `-t/--timeout` will work more reliably.
|
51
44
|
|
52
|
-
An output line is considered committed if
|
45
|
+
**Note:** `timeout` specifies how many seconds `multiCMD` will wait before killing the command if **no committed output** was detected for this duration. An output line is considered committed if the **stream handler** encounters a `\n` or `\r` character.
|
53
46
|
|
54
47
|
|
55
48
|
Install via
|
@@ -12,7 +12,7 @@ import re
|
|
12
12
|
import itertools
|
13
13
|
import signal
|
14
14
|
|
15
|
-
version = '1.
|
15
|
+
version = '1.20'
|
16
16
|
__version__ = version
|
17
17
|
|
18
18
|
__running_threads = []
|
@@ -194,7 +194,7 @@ def __run_command(task,sem, timeout=60, quiet=False,dry_run=False,with_stdErr=Fa
|
|
194
194
|
start_time = time.time()
|
195
195
|
outLength = len(task.stdout) + len(task.stderr)
|
196
196
|
time.sleep(0)
|
197
|
-
sleep_time = 1.0e-
|
197
|
+
sleep_time = 1.0e-7 # 100 nanoseconds
|
198
198
|
while proc.poll() is None: # while the process is still running
|
199
199
|
if task.stop:
|
200
200
|
proc.send_signal(signal.SIGINT)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|