Create a simple CGI server for Python

Sometimes there is a need that python scripts are executed directly from the browser. With CGIHTTPServer it goes very easily.

Create Folders

Create Python File

Add some content like:

Change the permission

Run CGIHTTPServer

Now open the browser and call URL: “http://localhost:8000/cgi-bin/test.py