Re: BaseHTTPRequestHandler: how to read/write until diconnected

2006-07-13 Thread notanotheridiot
Maksim Kasimov wrote: > I'm trying to write an server-application, using > BaseHTTPServer/BaseHTTPRequestHandler. > > When application is running, some client-application can post data to the > server, and BaseHTTPRequestHandler reads all headers and posted raw data from > "rfile", sends back r

stdout/stderr for only one thread in a multithreaded python app

2006-07-13 Thread notanotheridiot
Hi- I'm trying to exec some arbitrary code in one thread of an application and read anything it prints to stdout or stderr in another thread. My question is how? I've tried changing sys.stdout, but that changes stdout for the whole application, not just that one thread, which means that any statu

Re: Running DocTest on Strings

2006-06-30 Thread notanotheridiot
André wrote: > Paddy wrote: > > notanotheridiot wrote: > > > Hi, > > > I have two strings - a docstring containing doctests and a code string > > > containing code to be tested with those doctests. I've been trying for > > > a day now to

Running DocTest on Strings

2006-06-29 Thread notanotheridiot
Hi, I have two strings - a docstring containing doctests and a code string containing code to be tested with those doctests. I've been trying for a day now to run the test without concatenating the two strings, adding: import doctest doctest.testmod to the bottom, writing it all to a file and exe