From: Stephen N. <ste...@co...> - 2002-01-26 14:37:04
|
Thanks for your advice Kevin. The CGI server I was using was based on cPython's CGIHTTPServer and the CGI script was in Jython. I changed the #! /local/bin/python to #! /usr/bin/env jython for the server, it detected the environment variable successfully. I'm not sure what the logic is behind this though and I think it is very strange. Anyway all working now! On Fri, 25 Jan 2002, Kevin Butler wrote: > At a guess, I'd say you're using a version of Jython older than 2.1. > > Versions before 2.1 had no support for environment variables, which are pretty necessary for the cgi module... > (and getting environment variables in Jython is just one more performance problem for the jython choice, but that's another story... :-) ) > > try 'jython cgi.py' in the jython/Lib directory, and look for the Shell Environment section. If it is empty, your jython version is too old, and you need to grab the new one from www.jython.org when SourceForge gets the files back up. > > If you are using 2.1, there is evidently another requirement for the cgi module to work. :-( > > kb > > Stephen Naicken wrote: > > > > Hi, > > > > I would like to write a cgi program using Jython as opposed to Python. > > I know this has it's disadvantages regarding performance, but it's just > > something I am playing with. > > > > When I submit a form to the Jython CGI program, it fails to get any > > values (text input) from the form and the cgi.FieldStorage is None. Am > > I correct in saying cgi.FieldStorage() is not supported? > > > > Thanks > > > > Stephen Naicken - ste...@co... > > > > _______________________________________________ > > Jython-users mailing list > > Jyt...@li... > > https://lists.sourceforge.net/lists/listinfo/jython-users > Stephen Naicken "It's all about the game and how you play it" - The Game |