To run a localhost webserver on port 8000, serving the content of the current directory:
python -m http.server
Pass -h for more options. python -m http.server
Pass -h for more options.Last year I ran http.server with -h to remind myself of something, and the --cgi flag caught my eye...funnily enough there's built in support in the web server for running CGI scripts. Alas, it's deprecated and will be removed in 3.13 later this year, but I when I discovered it I couldn't resist the opportunity to write a CGI script for the first time 20-something years: https://github.com/drien/python-httpserver-upload