where should I look for sys.stderr output?

Fernando Perez fperez528 at yahoo.com
Mon May 12 21:17:49 EDT 2003


Steve Canfield wrote:

> Gerhard Häring <gh at ghaering.de> wrote in message
> news:<slrnbbveob.15s.gh at haering.opus-gmbh.net>...
>> Steve Canfield <stevecanfield at yahoo.com> wrote:
>> > Okay- this probably seems like a really dumb question, but I've been
>> > stuck on it for a little while now...
>> > 
>> > I have a MoinMoin wiki that I've been playing with. Somehow, I broke
>> > the attach file function. When I click on the "Attach File" link, I
>> > get a SyntaxError: invalid syntax page. The offending line is:
>> >  text = ' print >>sys.stderr, "save_drawing: tainted path \'%s\',
>> > aborting!" % filename\012'
>> > 
>> > How do I figure out where sys.stderr messages end up? This is running
>> > on a RedHat 7.3 machine.
>> 
>> In the log file of your web server?
>> 
>> /var/log/apache/error.log or some such.
> 
> I never did find where the stderr is being written to, but I did find
> my problem. My /usr/bin/python was version 1.52 and the MoinMoin
> package was expecting version 2.2. I changed this and the MoinMoin
> stuff works fine now, but a bunch of the Python system administration
> stuff tools are broken now. :(
> 
> I'm leaving it as is for now because I don't feel like figuring out
> which version of python each script needs.

Basically:

Option 1: keep redhat 7.3, and _LEAVE 1.5.2 IN PLACE_.  Install the python2 rpm,
and point any new scripts to '/usr/bin/env python2' instead of
'/usr/bin/python'.  If you remove 1.5.2 (or make /usr/bin/python point to
anything newer than 1.5.2), all hell will break loose in a redhat 7.x machine.  

RedHat could have done the world a service by writing their 1.5-dependent
scripts to point _explicitly_ to 1.5, allowing people to upgrade in peace.  But
they didn't, so you're stuck.  Whether an ounce of common sense will creep into
RedHat for similar situations in the future is anyone's guess, but I wouldn't
hold my breath.

Option 2: upgrade to redhat 8/9.  These use python 2.x by default.

Cheers,

f.




More information about the Python-list mailing list