Python CGI-Bin Scripts
I have Fedora 6 running Apache/PHP/MySQL and Python 2.5.
I can make a web page that submits data to a Python app and it works, see below.
Web form.
<form name="form1" id="form1" method="post" action="/cgi-bin/software_proc_codes.py">
Python code.
#!/usr/bin/python
import cgi
print "Content-Type: text/plain"
print "Hello, world"
The problem I am having is how to call a compiled Python code.
I have tried changing the web form to call
/cgi-bin/software_proc_codes.pyc and failed.
I have removed the "#!/usr/bin/python" from the script, compiled and tried the following.
#!/usr/bin/python
import /var/www/cgi-bin/hello.pyc
Do I need to set something up in Apache to handle .pyc?
Last edited by chaney44145; 01-15-2008 at 11:30 AM.
|