Jump to content

[Solved] Help with using Python 3.x


Deflect

Recommended Posts

I read on this thread http://www.helionet.org/index/index.php?sh...3&hl=python

that it was possible to get Python 3.x working.

(Specifically, this post: http://www.helionet.org/index/index.php?s=...ost&p=59457 )

 

I've so far got normal Python running:

http://www.multiscale.co.cc/cgi-bin/test2.py

#!/usr/bin/python

print "Content-Type: text/plain\n\n"

print "Hello World!"

 

But I can't get Python 3.2 to work (it always returns a 500 error):

http://www.multiscale.co.cc/cgi-bin/test1.py

#!/usr/bin/env python3.2

print("Content-Type: text/plain\n\n")

print("Hello World!")

 

My website is hosted on Johnny (www.multiscale.co.cc, username = deflect).

 

Can anybody help me out?

Link to comment
Share on other sites

Cool, thanks -- it's working now.

 

Also, I have another question:

Is there a delay present between uploading a Python script via FTP and it showing up through a server side include?

 

I have a different python script that I'm trying out

http://www.multiscale.co.cc/cgi-bin/test3.py

and I added a

<!--#exec cgi="/cgi-bin/test3.py" -->

tag to my webpage, but sometimes the html from the python script vanishes from the webpage but reappears later, which is really weird.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...