A wrapper for subprocess popen
Project description
OSMeterium
The osmeterium is a defensive organ found in all papilionid larvae, in all stages.
A simple wrapper for Popen to meet MapColonies org needs for running background processes and pipe the output.
Usage
Async
t = run_command_async('ping -c 5 www.google.com',
(lambda x: print('Hey this stdout output {0}'.format(x))),
(lambda x: print('Hey this stderr output {0}'.format(x))),
(lambda y: print('This is exit code ${0}'.format(y))),
(lambda: print('Command success'))) # return a Thread Object
t.join()
Sync
run_command('ping -c 5 www.google.com',
(lambda x: print('Hey this stdout output {0}'.format(x))),
(lambda x: print('Hey this stderr output {0}'.format(x))),
(lambda y: print('This is exit code ${0}'.format(y))),
(lambda: print('Command success')))
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
osmeterium-0.0.3.tar.gz
(2.0 kB
view details)
Built Distribution
File details
Details for the file osmeterium-0.0.3.tar.gz
.
File metadata
- Download URL: osmeterium-0.0.3.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.6.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5b1fdb535f07786bc38c0989b607f40896aefc859330e339ccdc3f6052d4428 |
|
MD5 | 97fc84c5079951d69afdf65d2b132515 |
|
BLAKE2b-256 | a107a9dfe3d36d1f17fdbc0d8497d255489a84167d190ac648d9865987f40863 |
File details
Details for the file osmeterium-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: osmeterium-0.0.3-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.6.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6519c4f298750b0f8f5bbda6d0c14bb14f7603e5ce7671727ef2df7f7115dbb5 |
|
MD5 | 02c55fb339a75d67cb2382eaecea8e27 |
|
BLAKE2b-256 | b38cad4d3fd2ca39c4d8a1c04586a8572788f710a183c7caffb8c234046231e6 |