Easily call processes from python
Project description
Perform is a python module for calling processes 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.
##usage: - To call a program:
import perform 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 extra information from a program:
command_object = perform.ls(return_object=True)
stdout = command_object.stdout stderr = command_object.stderr stdout = command_object.stdout
To call a command in the shell:
print(perform._(“ls | grep ‘py’”, shell=True))
##more examples
import perform
stdout = perform.ls()
print(perform.git(“ls-files”, “-m”))
print(perform._(“pip2.7”, “install”, “perform”))
stdout = perform.raspistill(“-o ~/image.jpg”)
print(perform.python(“-c”, “import perform;print(perform.echo(‘hello’))”)
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
Built Distributions
Hashes for perform-0.0.7.linux-x86_64.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32908f9ca357c70d45ec02ca8697d53c944418c8728526fd223595cfebaaa1b5 |
|
MD5 | b0b85d3458b114021793a5e1536196f0 |
|
BLAKE2b-256 | 1396a8d387f81514296385236b56b454f3cfb7c227ab05a33dcf3929a8645692 |
Hashes for perform-0.0.7-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 315d4ca21139fe3f99b7ac6ee244ecbe62510b80887e3eb326e3b69f1999d354 |
|
MD5 | a60736069ace8ec1ba42ed0f6f723012 |
|
BLAKE2b-256 | 10a381da73d0b3a357173b7b8d86a69ce45aa0f32c290cf4570d9ffab1f5ca6c |