7.1 Standard Library and Tooling Tour
Python’s standard library provides production-ready modules for common engineering tasks.
OS and filesystem
osandshutilfor paths, process interactions, and file operationsglobfor wildcard expansion
CLI and process behavior
sys.argvfor raw CLI argumentsargparsefor robust command-line interfacessys.stderrandsys.exit()for error and termination behavior
Text, math, and data utilities
refor regular expressionsmath,random,statisticsfor numeric workdatetimefor date/time operations
Compression and data exchange
gzip,bz2,lzma,zipfile,tarfilejson,csv,sqlite3
Testing and quality
doctestfor executable doc examplesunittestfor structured unit test suites
Official references
- Stdlib tour: https://docs.python.org/3/tutorial/stdlib.html
- Library index: https://docs.python.org/3/library/index.html
argparse: https://docs.python.org/3/library/argparse.htmlunittest: https://docs.python.org/3/library/unittest.html