skip to navigation
skip to content

shell 1.0.1

A better way to run shell commands in Python.

“”“A better way to run shell commands in Python.”“”

Built because every time I go to use subprocess, I spend more time in the docs & futzing around than actually implementing what I’m trying to get done.

Full docs are at


  • Python 2.6+ or Python 3.3+


If you just need to quickly run a command, you can use the shell shortcut function:

>>> from shell import shell
>>> ls = shell('ls')
>>> for file in ls.output():
...     print file

If you need to extend the behavior, you can also use the Shell object:

>>> from shell import Shell
>>> sh = Shell(has_input=True)
>>> cat ='cat -u')
>>> cat.write('Hello, world!')
>>> cat.output()
['Hello, world!']

You can even chain calls if you’d like:

>>> from shell import shell
>>> shell('cat -u', has_input=True).write('Hello, world!').output()
['Hello, world!']


Using pip, simply run:

pip install shell



File Type Py Version Uploaded on Size
shell-1.0.1-py2.py3-none-any.whl (md5) Python Wheel 2.7 2013-12-03 5KB
shell-1.0.1.tar.gz (md5) Source 2013-06-03 4KB