Advertisement
obernardovieira

First ( CGI ) in Python

Feb 16th, 2014
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. #!/usr/bin/env python
  2. #!C:\Python27\Python.exe
  3.  
  4. # enable debugging
  5. import cgitb
  6. cgitb.enable()
  7. import sys
  8. sys.stderr = sys.stdout
  9.  
  10. print ('Content-type: text/html\r\n\r')
  11. print
  12. print ('<html><body><div style="color:blue;">Hello World!</div></body></html>')
  13.  
  14.  
  15.  
  16. #you need to save it with .cgi extension and save in cgi-bin folder
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement