Help with Python

 
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions
View previous topic :: View next topic  
Author Message
cancer10
-


Joined: 25 Apr 2006
Posts: 1

PostPosted: Tue Apr 25, 2006 8:04 pm    Post subject: Help with Python Reply with quote

Hello,

I ahve just installed Aprelium web server + ActivePython and followed all instruction according to http://www.aprelium.com/abyssws/python.html



Now I get the following error when I try to access a python page


Error 500

Internal Server Error




I ahve the following line in my abc.py file which is in the "C:\Program Files\Abyss Web Server\htdocs" directrory


Code:
print "Hello Python!"




Also, activepyton is installed in C:\Python24


Please help me


I am running windows XP
Back to top View user's profile Send private message
roganty
-


Joined: 08 Jun 2004
Posts: 357
Location: Bristol, UK

PostPosted: Tue Apr 25, 2006 8:29 pm    Post subject: Reply with quote

I haven't used python before, but I think you need to send a header before printing anything to the browser

Code:
print "Content-type:text/html\n\n"
print "<html>\n<head>\n<title>Helo World</title>\n</head>\n<body>\n"
print "<h1>Hello World</h1>\n</body>\n</html>\n"


If that doesn't work, you might have to import the cgi module
http://www.cs.virginia.edu/~lab2q/lesson_7/
http://docs.python.org/lib/module-cgi.html
_________________
Anthony R

Roganty
| Links-Links.co.uk
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group