Skip to main content
File added late

1 file was added to this release more than 14 days after its initial publication. Inspect the release files before installing.

“””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 https://shell.readthedocs.org/en/latest/.

Requirements

  • Python 2.6+ or Python 3.3+

Usage

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
'another.txt'

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

>>> from shell import Shell
>>> sh = Shell(has_input=True)
>>> cat = sh.run('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!']

Installation

Using pip, simply run:

pip install shell

License

New BSD

Metadata

Release files for shell 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

File added late

1 file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release files before installing.

Source distribution (sdist)

Source distribution for shell 1.0.1
File Size Uploaded
shell-1.0.1.tar.gz 4.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for shell 1.0.1
File Interpreter ABI Platform
shell-1.0.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 9.9 kB

Release files / shell-1.0.1.tar.gz

Download URL shell-1.0.1.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6fbaa88f85de228ddecef33cb1e9037f4959f6f76942b01769e4139a038f6513
BLAKE2b-256 checksum
How to use checksums
710cd6270ed3bf86d036c37929443d7f4a7a8af77dbbce11cec7ddce8d8599c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / shell-1.0.1-py2.py3-none-any.whl

File added late

This file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release file before installing.

Download URL shell-1.0.1-py2.py3-none-any.whl
Size 5.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
64e3347d1dd2c8f3c3f3df5e6ebe9084d768ae20985aef6793854b9f47d4045a
BLAKE2b-256 checksum
How to use checksums
c1195fc161e830b08bf2b419a04b0105f2dbf095759148d38cd1e99feadc4146
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page