Re: Strange behavior with os call in cgi script

2006-02-08 Thread Rene Pijlman
Vinay Sajip: >Rene Pijlman: >> It struck me as somewhat complicated as well. >You should look at later versions of Python - your points above about >easier configuration have already been addressed: here's a link from >the current (2.4) docs: > >http://docs.python.org/lib/minimal-example.html Yes

Re: Strange behavior with os call in cgi script

2006-02-07 Thread Vinay Sajip
Rene Pijlman wrote: > It struck me as somewhat complicated as well. > > Looking at the basic example: > http://www.python.org/doc/2.3.5/lib/node304.html > > ... the things that first-time users shouldn't be bothered with IMO are: > > 1. Getting a logger by name from a hierarchical namespace. There

Re: Strange behavior with os call in cgi script

2006-02-07 Thread Jim
> But I do think that adding logging to a cgi script is a sensible thing to > do for a beginner. Let me second that. I happen to write a lot of CGI, and ISTM that while you can do it without logging, you are condemming yourself to a lot of staring at the screen, head-scratching, and saying ``Now w

Re: Strange behavior with os call in cgi script

2006-02-06 Thread Fredrik Lundh
Rene Pijlman wrote: > But I do think that adding logging to a cgi script is a sensible thing to > do for a beginner. Getting that to run in a debugger is probably way more > complicated. on the other hand, adding if 1: # set to 0 when deploying print "" print cgi.escape(repr(

Re: Strange behavior with os call in cgi script

2006-02-06 Thread Rene Pijlman
Steve Holden: >Rene Pijlman: >> Add logging to your program: >> http://www.python.org/doc/2.3.5/lib/module-logging.html >> >Probably oiverkill, particularly for a beginner (is it only me that >thinks the logging module is either way over-complicated or way >under-documented?). It struck me as s

Re: Strange behavior with os call in cgi script

2006-02-06 Thread Duncan Booth
Steve Holden wrote: >> Add logging to your program: >> http://www.python.org/doc/2.3.5/lib/module-logging.html >> > Probably oiverkill, particularly for a beginner (is it only me that > thinks the logging module is either way over-complicated or way > under-documented?). No, I would agree with

Re: Strange behavior with os call in cgi script

2006-02-05 Thread Steve Holden
Rene Pijlman wrote: > sophie_newbie: > >>OK, interesting, but just how dow I print he environment in the >>program?? > > > Add logging to your program: > http://www.python.org/doc/2.3.5/lib/module-logging.html > Probably oiverkill, particularly for a beginner (is it only me that thinks the log

Re: Strange behavior with os call in cgi script

2006-02-05 Thread Rene Pijlman
sophie_newbie: >OK, interesting, but just how dow I print he environment in the >program?? Add logging to your program: http://www.python.org/doc/2.3.5/lib/module-logging.html And log the environment: http://www.python.org/dev/doc/newstyle/lib/os-procinfo.html -- René Pijlman -- http://mail.py

Re: Strange behavior with os call in cgi script

2006-02-05 Thread sophie_newbie
OK, interesting, but just how dow I print he environment in the program?? -- http://mail.python.org/mailman/listinfo/python-list

Re: Strange behavior with os call in cgi script

2006-02-05 Thread Dennis Benzinger
sophie_newbie schrieb: > I have written a cgi script that seems to run perfectly from the > command line when I simulate some cgi input using > os.environ['QUERY_STRING']. > > The thing is that when I run it from the browser, one of my os.system > calls, which gets excecuted fine when running the

Strange behavior with os call in cgi script

2006-02-05 Thread sophie_newbie
I have written a cgi script that seems to run perfectly from the command line when I simulate some cgi input using os.environ['QUERY_STRING']. The thing is that when I run it from the browser, one of my os.system calls, which gets excecuted fine when running the program in the interpreter, doesn't