Intro to Python


#1

Hello there!

I have recently taken on the task of learning python. I bought an account with Dreamhost mostly just to fiddle with it (as well as other web technologies)

My test file is at:
http://www.happytwoyears.com/hello.py

its code is:

#!/usr/bin/python

import sys
import cgi
import cgitb; cgitb.enable()

print “Content-type: text/html\n\n”

print “”" Hello World

Hello World

Hello there World, my name is Steve.

"""

As you can see, it gives me a nasty error. Also, does anyone know how to get import cgitb; cgitb.enable() working? (its just an in browser error displayer)

Thanks in advance,


#2

chmod to at least 0700 (so it’s executable).

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#3

thank you for your response! Sadly i already did a chmod 755 in accordance with:


#4

$ dos2unix hello.py

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost