Easily call processes from python
Project description
Perform is for calling processes from python in a simple and easy way. Each program is added to the perform module as a function that returns the stdout printed by the program.
Examples:
To call a normal program that whose name doesn't contain symbols:
stdout = perform.ls()
To pass arguments to a program:
stdout = perform.git("ls-files", "-m")
To call a program that contains symbols in its name:
stdout = perform._("pip2.7", "install", "perform")
To get stderr from a program:
try:
perform.git("asdad")
except Exception as e:
print(str(e))
To call a command in the shell:
print(perform._("ls | grep 'py'", shell=True))
Examples:
To call a normal program that whose name doesn't contain symbols:
stdout = perform.ls()
To pass arguments to a program:
stdout = perform.git("ls-files", "-m")
To call a program that contains symbols in its name:
stdout = perform._("pip2.7", "install", "perform")
To get stderr from a program:
try:
perform.git("asdad")
except Exception as e:
print(str(e))
To call a command in the shell:
print(perform._("ls | grep 'py'", shell=True))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
perform-0.0.4.tar.gz
(2.0 kB
view hashes)
Built Distribution
Close
Hashes for perform-0.0.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53fd6db3832f4be43cc63a26228770cf71bf4ab8bb94d4d58651f9e9c3c413f2 |
|
MD5 | 59f83fc8d72db56ff898cb3d98463fad |
|
BLAKE2b-256 | cb647cf1cf439a4c3c7aa69f6addbec748e2da2861ad484a3f4112c4d8cb8a84 |