Convenience functions for constructing shell commands.
Latest release 20260912.1: Fix project specification.
Functions for safely constructing shell command lines from bare strings. Somewhat like the inverse of the shlex stdlib module.
As of Python 3.3 the function shlex.quote() does what quotestr() does.
As of Python 3.8 the function shlex.join() does what quoteargv() does.
Short summary:
-
main_shqstr: shqstr: emit shell-quoted form of the command line arguments. -
quote: Quote the supplied strings, return a list of the quoted strings. -
quoteargv: Quote strings, assemble into command string. -
quotestr: Quote a string for use on a shell command line.
Functions
main_shqstr(argv=None)
shqstr: emit shell-quoted form of the command line arguments.
quote(args)
Quote the supplied strings, return a list of the quoted strings.
As of Python 3.8 the function shlex.join() probably does
what you would have done with the result of this function
i.e. join the resulting strings together.
quoteargv(argv)
Quote strings, assemble into command string.
quotestr(s)
Quote a string for use on a shell command line.
As of Python 3.3 the function shlex.quote() is available for this.
Release Log
Release 20260912.1: Fix project specification.
Release 20260912: Rename quotecmd to quoteargv.
Release 20210316: Minor doc update.
Release 20180613: Rework quotestr significantly to provide somewhat friendlier quoting, include "," in the SAFECHARS.
Release 20170903.2: bugfix main boilerplate after setuptools workaround
Release 20170903.1: workaround setuptool's slightly dumb console_scripts call of a "main" function
Release 20170903: shqstr command; new quotecmd(argv) function
Release 20150118: Extend SAFECHARS to include colon.
Release 20150111: minor cleanup
Release 20150107: initial standalone public release
Metadata
Release files for cs-sh 20260912.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cs_sh-20260912.1.tar.gz | 2.7 kB | Without provenance | Details for cs_sh-20260912.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cs_sh-20260912.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for cs_sh-20260912.1-py2.py3-none-any.whl |
Total release size: 6.2 kB
Release files / cs_sh-20260912.1.tar.gz
| Download URL | cs_sh-20260912.1.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
14d2b31959292fbed54781790391b7b8a5da83a3bf569315cfff3ac425ed96ea
|
|
BLAKE2b-256 checksum How to use checksums |
f79537c8d65f0379ac0646a12f646ecd9b813dd74e528d4cf5e830141182cd01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Release files / cs_sh-20260912.1-py2.py3-none-any.whl
| Download URL | cs_sh-20260912.1-py2.py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
0fde522f1817c5ed5fb67a0aa5625e3c1b740c438a9e2c2bb7c3210d394c83c7
|
|
BLAKE2b-256 checksum How to use checksums |
dfb4a433cd89c5ff10eb5b55cdaaf86821211ebbb2259dae8cb597432de0082d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Security for cs-sh 20260912.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.