Skip to main content

Build Coverage PyPI version

Parse line as shell words.

Usage

>>> from shellwords import ShellWords
>>> s = ShellWords()
>>> s.parse("./foo --bar=baz")
[u'./foo', u'--bar=baz']
>>> s.parse('./foo --bar=baz foobar')
[u'./foo', u'--bar=baz', u'foobar']
>>> os.environ['FOO'] = 'bar'
>>> s = ShellWords(parse_env=True)
>>> s.parse("./foo $FOO")
[u'./foo', u'bar']
>>> s = ShellWords(parse_backtick=True)
>>> s.parse("./foo `echo $SHELL`")
[u'./foo', u'/bin/bash']

Thanks

This is based on go-shellwords package.

Changelog

0.1.0 (2015-01-29)

  • Initial Release

Metadata

Release files for shellwords 0.1.0

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

Source distribution (sdist)

Source distribution for shellwords 0.1.0
File Size Uploaded
shellwords-0.1.0.tar.gz 3.7 kB Details

Built distribution (wheel)

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

Total release size: 8.1 kB

Release files / shellwords-0.1.0.tar.gz

Download URL shellwords-0.1.0.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
7dac53f0cfe779f4dbfdd86b1ea6ac924a7588b56123ae1f9eda7a5686fa3576
BLAKE2b-256 checksum
How to use checksums
eaf8cd4ce7a8207cdc5bb9c40ee0bde4ed270887de584006535e44856ef4efc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / shellwords-0.1.0-py2.py3-none-any.whl

Download URL shellwords-0.1.0-py2.py3-none-any.whl
Size 4.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
18ca58eccc16de3540e2889f9badd67d92a6edced64ffb760cfd12ccca598bef
BLAKE2b-256 checksum
How to use checksums
caf756e15b30d1dd33488ffed1ba7c0cdaf38089eae06f38e0c8920a0d45f1db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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