En Sat, 17 Oct 2009 23:54:23 -0300, Joseph Turian <tur...@gmail.com> escribió:

I was having a mysterious problem with SimpleXMLRPCServer. (I am using
Python 2.5.2)

I'd start updating Python to the latest 2.5 release: 2.5.4

The request handlers were sometimes failing without any error message
to the log output.

What I discovered was perplexing.
I had some 'print' statements in the handers that, assuming the
request would be handled, would print just fine. When I switched to
'print >> sys.stderr', the request handlers would just fail
completely, and not make the sys.stderr output that I desired.

Perhaps you need to flush the file also? sys.stderr.flush()

It seems that SimpleXMLRPCServer is clobbering stderr in some bizarre
and silent-error-causing way.
I can't really find any documentation of explanation of this
phenomenon.

Could someone please illuminate it for me?

XMLRPCServer doesn't reassign or alter sys.stderr, just uses it in the log_message method. I'd look in some other place...

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to