Skip to content

Instantly share code, notes, and snippets.

@nwjlyons
Last active November 4, 2022 19:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nwjlyons/78b667119ef09f8b67f98db92a17e7ca to your computer and use it in GitHub Desktop.
Save nwjlyons/78b667119ef09f8b67f98db92a17e7ca to your computer and use it in GitHub Desktop.
CGI Python Example
#! /usr/bin/env python
print("""Content-Type: text/html
<h1>Hello World</h1>""")
@nwjlyons
Copy link
Author

Setup

  • index.py should be marked as executable chmod +x index.py
  • index.py should be in a folder called cgi-bin

eg.

.
└── cgi-bin
    └── index.py

Run CGI server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment