configuring apache for python scripts
How should I configure my apache server for runnning python scripts. I am able to run perl scripts from my apache server but unable to run python scripts. Please help me out.
If you can run Perl CGI already it should be pretty easy to use Python too. It's probably the path to Python which is causing the problem. Not knowing where you have Python installed or which platform your using id try #!/usr/bin/env python. on Windows it will find Python where ever you have it installed, on Linux/Unix I believe it searches only the usr/bin directory but in not sure about that. Anyway give it a try.
I was able to run the python script
I was able to run the python script successfully after spending a little more time on the problem. Now if anyone could tell me how to run jython scripts than that wud be really great. Because now I am stuck there. . I know this is not the right platform to post such questions, but I think jython is the logical next step for python application developers.
I am sure now that I am giving the right path, but the apache server gives an internal server error, every time i try to read a script that specifies the location to jython interpreter. Same file with the location of python interpreter works fine.
Does apache supports Jython scripts after all?
Jython and CGI
Not having used Jython much I wouldnt know about developing in Jython. but if your trying to use Jython for CGI just use, #!/usr/bin/env jython. It works for me.
print 'content-type: text/plain\n'
print 'yo, from jython'
if your talking about developing applets in Jython, then you dont need to configure apache at all as applets run client side. You'd have to check up on this though. If im wrong let me know!