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
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
> 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
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(
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
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
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
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
OK, interesting, but just how dow I print he environment in the
program??
--
http://mail.python.org/mailman/listinfo/python-list
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
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
11 matches
Mail list logo