alga tronic
alga tronic

Reputation: 46

Raw CGI in Python

I created a litlle script but I already have an error, I don't know what causes this or how to fix it, it's on an ubuntu vps, the error is located on this site:

http://alfaxtronic.koding.io/python.py

This is the Script:

#!/usr/bin/python
import os
import platform
import cgitb
cgitb.enable()
print "Content-Type: text/html"
print
print "hi"
form = cgi.FieldStorage()

Upvotes: 1

Views: 72

Answers (1)

Klaus D.
Klaus D.

Reputation: 14369

You missed an import. Add this to the import lines at the top:

import cgi

Upvotes: 2

Related Questions