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:
obj = perform.ls(return_object=True) # or perform.ls(ro=True)
stdout = obj.stdout
stderr = obj.stderr
errcode = obj.errcode
- To call a command in the shell:
print(perform._("ls | grep 'py'", shell=True))
- To import a specific command:
from perform import ls
print(ls("-a"))
- To use perform for a non-blocking call:
perform.firefox("google.com", no_return=True)
perform.firefox("github.com", no_return=True)
perform.firefox("kernel.org", nr=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'))")
##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:
obj = perform.ls(return_object=True) # or perform.ls(ro=True)
stdout = obj.stdout
stderr = obj.stderr
errcode = obj.errcode
- To call a command in the shell:
print(perform._("ls | grep 'py'", shell=True))
- To import a specific command:
from perform import ls
print(ls("-a"))
- To use perform for a non-blocking call:
perform.firefox("google.com", no_return=True)
perform.firefox("github.com", no_return=True)
perform.firefox("kernel.org", nr=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
perform-0.0.8.tar.gz
(2.8 kB
view details)
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file perform-0.0.8.tar.gz.
File metadata
- Download URL: perform-0.0.8.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f4fce6b39a107acaa2e04da3e89ad5cc6c698082aa61e94ddf22bbef08a35af
|
|
| MD5 |
6819315e712e920b4e98f957c0288bbb
|
|
| BLAKE2b-256 |
59661205b4656dd1aaebad5aea844ef8193e5fe2a2718cb307d8a8feefe3648a
|
File details
Details for the file perform-0.0.8.linux-x86_64.tar.gz.
File metadata
- Download URL: perform-0.0.8.linux-x86_64.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be77c46ac492e9f81fc117b9f559e2748f54068468a6df39b521b670771bae07
|
|
| MD5 |
f8c48b05edcf4b37b406e2efe2f18102
|
|
| BLAKE2b-256 |
db468fe17b09d91d9e0f0526beb62d50f2a5ca526241e71ad1f478b904b4623b
|
File details
Details for the file perform-0.0.8-py2.py3-none-any.whl.
File metadata
- Download URL: perform-0.0.8-py2.py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85045a9265252ff8304ae3516919569ad82a59fb6adcf6922669fd3849607af2
|
|
| MD5 |
2bf64b97fd71e696d8f4b3615a8402b9
|
|
| BLAKE2b-256 |
584aba58370ccd986efea61f599635f199fb0e33b230892e9a3ac0cd81798b51
|