Versatile utility function to run external processes
Project description
ProcRunner
Versatile utility function to run external processes
Free software: BSD license
Documentation: https://procrunner.readthedocs.io.
Features
runs an external process and waits for it to finish
does not deadlock, no matter the process stdout/stderr output behaviour
returns the exit code, stdout, stderr (separately, both as bytestrings), and the total process runtime as a dictionary
process can run in a custom environment, either as a modification of the current environment or in a new environment from scratch
stdin can be fed to the process, the returned dictionary contains information how much was read by the process
stdout and stderr is printed by default, can be disabled
stdout and stderr can be passed to any arbitrary function for live processing (separately, both as unicode strings)
optionally enforces a time limit on the process
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.7.0 (2018-05-13)
Unicode fixes. Fix crash on invalid UTF-8 input.
Clarify that stdout/stderr values are returned as bytestrings.
Callbacks receive the data decoded as UTF-8 unicode strings with unknown characters replaced by ufffd (unicode replacement character). Same applies to printing of output.
Mark stdin broken on Windows.
0.6.1 (2018-05-02)
Maintenance release to add some tests for executable resolution.
0.6.0 (2018-05-02)
Fix Win32 API executable resolution for commands containing a dot (‘.’) in addition to a file extension (say ‘.bat’).
0.5.1 (2018-04-27)
Fix Win32API dependency installation on Windows.
0.5.0 (2018-04-26)
New keyword ‘win32resolve’ which only takes effect on Windows and is enabled by default. This causes procrunner to call the Win32 API FindExecutable() function to try and lookup non-.exe files with the corresponding name. This means .bat/.cmd/etc.. files can now be run without explicitly specifying their extension. Only supported on Python 2.7 and 3.5+.
0.4.0 (2018-04-23)
Python 2.7 support on Windows. Python3 not yet supported on Windows.
0.3.0 (2018-04-17)
run_process() renamed to run()
Python3 compatibility fixes
0.2.0 (2018-03-12)
Procrunner is now Python3 3.3-3.6 compatible.
0.1.0 (2018-03-12)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file procrunner-0.7.0.tar.gz
.
File metadata
- Download URL: procrunner-0.7.0.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b483f405c4cfeacb4676e25e748d6406f2e560723ce260d77aa11d37f999642a |
|
MD5 | ed07a85bea7aec2f355d3efabeb787ac |
|
BLAKE2b-256 | 3a9b075583ad4c729a7320129ef05d3b52e8c59644b48c79304403244cce6035 |
File details
Details for the file procrunner-0.7.0-py2.py3-none-any.whl
.
File metadata
- Download URL: procrunner-0.7.0-py2.py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f47f4025e148c54425a2bea94b877f1b710eb6a0ddb0ee446cbc4cb8c2f1eab9 |
|
MD5 | 57e7403697550efadf068eefc89a188d |
|
BLAKE2b-256 | e42f8b12c69ee985381eb5fb18f4db95a7385b4a841da2c061eb6d89c5fff08d |