[Tutor] Cannot run .py file from apache web server , Guidance requested
John Joseph
jjk_saji at yahoo.com
Tue Jan 31 13:24:07 CET 2006
Hi
I am trying to execute .py scripts from my
apache web server , but it is not giving the results
as how I run php files , it just displays the
contents of the script , I am able to run and get
results of PHP from the same loaction
my “sample-test.py “file is as follows
import cgi
reshtml = '''Content-Type: text/html\n
<HTML><HEAD><TITLE> Friends CGI Demo (dynamic screen)
</TITLE></HEAD>
<BODY><H3>Friends list for: <I> Joseph </I></H3>
Your name is: <B>John </B><P>
You have <B> 20</B> friends.
</BODY></HTML>'''
When I access this script from the url
“http://192.168.20.99/~john/ sample-test.py”
in the browser I see the contents of the file , not
the result
Is there any function similar to phpino() in python ,
so that I can test
Guidance requested ,
Joseph John
___________________________________________________________
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com
More information about the Tutor
mailing list