Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fengsp/fork
Doing subprocess in Python should be easy
https://github.com/fengsp/fork
Last synced: about 2 months ago
JSON representation
Doing subprocess in Python should be easy
- Host: GitHub
- URL: https://github.com/fengsp/fork
- Owner: fengsp
- License: other
- Created: 2014-06-13T10:06:41.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-06-17T06:31:04.000Z (over 10 years ago)
- Last Synced: 2024-10-07T20:48:35.140Z (3 months ago)
- Language: Python
- Size: 133 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES
- License: LICENSE
Awesome Lists containing this project
README
Fork
====Fork is a Python package for making writing subprocesses easy. Currently
we just monkey patching the ``call`` and ``Popen`` so that they support
taking string like command.Installation
------------::
$ pip install forkUsage
-----.. code:: python
import fork
# call
fork.call('pip install requests')
fork.call('date')
fork.call('touch /tmp/hello\ fork.txt')# Popen
p = fork.Popen('ls -l', stdout=fork.subprocess.PIPE)
output, error = p.communicate()
print p.pid
print output
print p.returncodeBetter
------If you feel anything wrong, feedbacks or pull requests are welcomed.