How to run CGI “hello world” with python http.server
From the http.server docs: CGIHTTPRequestHandler can be enabled in the command line by passing the –cgi option: $ python3 -m http.server –bind localhost –cgi 8000 Put your script into cgi_directories: This defaults to [‘/cgi-bin’, ‘/htbin’] and describes directories to treat as containing CGI scripts. Open in the browser: $ python -mwebbrowser http://localhost:8000/cgi-bin/hello.py where hello.py: #!/usr/bin/env … Read more