Built-in Python Modules and Command-line Interfaces
This article explores interesting built-in Python features that could be useful for Python and non-Python developers.
Getting Started
With Python installed, we can use many of the built-in modules and command-line interfaces without any coding.
We can view more information on a particular command-line interface using the -h
option.
For example, to view the help information of the HTTP server module.
python -m http.server -h
HTTP Server
With a one-liner, we can use Python to create an HTTP server.
This command serves files relative to the current directory, using port 8000.
python -m http.server