python with tomcat on windows
Posted by tasslehoff (tasslehoff), 9 October 2007I'm trying to run python/cgi scripts on tomcat, but i'm running into quite some trouble.
I have tomcat and python installed, and have managed to run scripts using perl, but when i switched to python, nothing will run - i just get a blank screen. I already switched the cgi executable for python, and it's detected, so i can't imagine why it will only give me a blank screen, no errors or exceptions show.
If any of you has an idea of what may be happening, i greatly appreciate your help!
Posted by admin (Graham Ellis), 9 October 2007Have you
1. Rewritten the Perl code into Python?
2. Changes the #! line to point at Python not Perl?
3. Ensured that your Python program outputs the appropriate headers?
4. Tested your Python from the command line.
It's quite hard to sort out the more generic "does not work" type questions ... especially without seeing any of the code we're looking for problems in ... can I suggest that you post a very simple Python script (of the "hello world" flavour) that fails for you, and I can se eif I can spot any issues and / or test it on my own system.
Posted by tasslehoff (tasslehoff), 9 October 2007Well, i managed to run a Hello World, but the script i need to run still won't work - i get a http 500 error. It's a simple proxy script from openlayers.com, and it should work *sigh*. I'll post the code anyway
Posted by admin (Graham Ellis), 10 October 2007If "hello world" works but your longer bit of code doesn't. thn you should be able to start adding bits in to "Hello world" until it fails, or taking bits out of your other code until it works, to give you a pointer as to where the problem area lies. Once you have the problem area isolated down to 3 or 4 lines, it should be possible to spot the problem or do further experiments to find what is wrong in that area.
PH: 01144 1225 708225 • FAX: 01144 1225 899360 • EMAIL: email@example.com • WEB: http://www.wellho.net • SKYPE: wellho