You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-15Lines changed: 17 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,8 @@ while solving various problems a developer may face among:
16
16
- Allow stdout/stderr stream output to be redirected to callback functions / output queues / files so you get to handle output in your application while commands are running
17
17
- Callback to optional stop check so we can stop execution from outside command_runner
18
18
- Callback with optional process information so we get to control the process from outside command_runner
19
+
- Callback once we're finished to easen thread usage
20
+
- Optional process priority and io_priority settings
19
21
- System agnostic functionality, the developer shouldn't carry the burden of Windows & Linux differences
20
22
- Optional Windows UAC elevation module compatible with CPython, PyInstaller & Nuitka
21
23
- Optional Linux sudo elevation compatible with CPython, PyInstaller & Nuitka
`command_runner` can set it's subprocess priority to 'low', 'medium' or 'high', which translate to 15, 0, -15 niceness on Linux and BELOW_NORMAL_PRIORITY_CLASS and HIGH_PRIORITY_CLASS in Windows.
`command_runner` takes **any** argument that `subprocess.Popen()` would take.
@@ -423,27 +437,15 @@ It also uses the following standard arguments:
423
437
- process_callback (function): Optional function that will take command_runner spawned process as argument, in order to deal with process info outside of command_runner
424
438
- split_streams (bool): Split stdout and stderr into two separate results
425
439
- silent (bool): Allows to disable command_runner's internal logs, except for logging.DEBUG levels which for obvious reasons should never be silenced
440
+
- priority (str): Allows to set CPU bound process priority (takes 'low', 'normal' or 'high' parameter)
441
+
- io_priority (str): Allows to set IO priority for process (takes 'low', 'normal' or 'high' parameter)
426
442
- close_fds (bool): Like Popen, defaults to True on Linux and False on Windows
427
443
- universal_newlines (bool): Like Popen, defaults to False
428
444
- creation_flags (int): Like Popen, defaults to 0
429
445
- bufsize (int): Like Popen, defaults to 16384. Line buffering (bufsize=1) is deprecated since Python 3.7
430
446
431
447
**Note that ALL other subprocess.Popen arguments are supported, since they are directly passed to subprocess.**
432
448
433
-
### logging
434
-
435
-
Even muted, `command_runner` will still log errors.
436
-
If you want to completely mute `command_runner`, you will have to set it's logger instance to `logger.CRITICAL` level, since this level is never called.
437
-
438
-
Example of entirely muted `command_runner` execution:
0 commit comments