Thin convenience wrappers for shelling out commands easily from python
Project description
[![PyPI version](https://badge.fury.io/py/pyshellout.svg)](https://badge.fury.io/py/pyshellout)
# python-shellout
Thin convenience wrappers for shelling out commands easily from python
## Installation
In shell with enough admin rights type
```bash
$ git clone https://github.com/Chiel92/python-shellout
$ cd python-shellout
$ python3 setup.py install
```
Or to obtain the version from PyPI do
```bash
$ pip install pyshellout
```
## Example Usage
```python
from pyshellout import get
files=get(r'find . -name "*.cpp" -o -name "*.h" -print0')
for f in files.z:
print(f)
matches=get(r"grep -zZ 'some regex pattern' '{filename}'", filename=f)
print(matches.z)
```
A more elaborate example can be found on [this blog post about automatically archiving merged
git branches.][archive-git-branches]
[archive-git-branches]: http://ctenbrinke.net/2016/06/07/archiving-branches-with-git/
# python-shellout
Thin convenience wrappers for shelling out commands easily from python
## Installation
In shell with enough admin rights type
```bash
$ git clone https://github.com/Chiel92/python-shellout
$ cd python-shellout
$ python3 setup.py install
```
Or to obtain the version from PyPI do
```bash
$ pip install pyshellout
```
## Example Usage
```python
from pyshellout import get
files=get(r'find . -name "*.cpp" -o -name "*.h" -print0')
for f in files.z:
print(f)
matches=get(r"grep -zZ 'some regex pattern' '{filename}'", filename=f)
print(matches.z)
```
A more elaborate example can be found on [this blog post about automatically archiving merged
git branches.][archive-git-branches]
[archive-git-branches]: http://ctenbrinke.net/2016/06/07/archiving-branches-with-git/
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
pyshellout-0.2.5.zip
(2.9 kB
view hashes)