getopt
Stdlib — CLIPython 2.0+Intermediate
C-style command-line option parsing
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 getopt print(f"Module: getopt") print(f"Contents: {dir(getopt)[:10]}")
The getopt module is part of Python's standard library. C-style command-line option parsing.
Try in PlaygroundTags
stdlibclicommand-line