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.2.tar.gz
(2.0 kB
view hashes)
Built Distribution
Close
Hashes for osmeterium-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c6708ee1bcf9d2de029d15144419ff729f6c4ccc8302b00d25ecfcdf886f7e1 |
|
MD5 | a590f01ce2a35f75dbd88769f8c60925 |
|
BLAKE2b-256 | e75d639caf50da779e8b0bb036663c1502f45bbd0ac3351f76e3c2036b4c61be |