shlex

Stdlib — CLIPython 2.0+Intermediate

Split and quote strings using shell-like syntax rules

Quick Info

Documentation
Official Docs
Python Version
2.0+
Dependencies
None — Python Standard Library
Install
Included with Python

Learn by Difficulty

Quick Example

python
import shlex

print(f"Module: shlex")
print(f"Contents: {dir(shlex)[:10]}")

The shlex module is part of Python's standard library. Split and quote strings using shell-like syntax rules.

Try in Playground

Tags

stdlibclicommand-line