Superprocess facilitates extending the built-in subprocess module. You can extend superprocess to add custom behaviour or use the bundled extensions, most notably support for running remote processes.
Installation
Requires Python 2.6, 2.7 or 3.4+.
To install superprocess, simply:
$ pip install superprocess
Usage
Run a remote command:
>>> superprocess.check_output('echo $SSH_CONNECTION', netloc='127.0.0.1', shell=True)
b'127.0.0.1 56924 127.0.0.1 22\n'
Open a pipe to a command:
>>> with superprocess.popen('ls') as f:
... for line in f:
... print(line.strip())
...
README.rst
setup.py
superprocess
superprocess.egg-info
Note: close() will raise a CalledProcessError if the return code is non-zero:
>>> f = superprocess.popen('echo Hello World!; exit 1', shell=True)
>>> f.read()
'Hello World!\n'
>>> f.close()
Traceback (most recent call last):
...
subprocess.CalledProcessError: Command 'echo Hello World!; exit 1' returned non-zero exit status 1
Customise an instance of superprocess to use the shell by default:
>>> from superprocess import Superprocess
>>> superprocess = Superprocess()
>>> superprocess.run = functools.partial(superprocess.run, shell=True)
>>> superprocess.call('exit 1')
1
License
Licensed under the Apache License, Version 2.0.
Metadata
Release files for superprocess 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| superprocess-0.2.0.tar.gz | 5.6 kB | Without provenance | Details for superprocess-0.2.0.tar.gz |
Release files / superprocess-0.2.0.tar.gz
| Download URL | superprocess-0.2.0.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a70012ffbedb0cacf3eacfc7024d04d0aedfc125dd07597cded9dfb52eadb0ba
|
|
BLAKE2b-256 checksum How to use checksums |
acffd719b162d210f73cfc7ea9cfe30f9816ee1b2c2a85b6e57d2661c4943fcb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for superprocess 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.