Gregory (Grisha) Trubetskoy
grisha at modpython.org
Wed Nov 5 10:24:37 EST 2003
There is one sys.stdout per Python interpreter. So however many clients connect to the server, they all share sys.stdout. You should not modify it, but use req.write() instead, and all will work fine. Grisha On Wed, 5 Nov 2003, Manera, Villiam wrote: > I'm starting to use new Session module and something strange sometimes > happens:<?xml:namespace prefix = o ns = > "urn:schemas-microsoft-com:office:office" /> > > For debug purpose: > > > > def test(req): > > sess = Session.DbmSession(req,timeout=7200) > > sys.stdout=req > > ... > > print 'et voila' > > ..... > > > > But sometime the output goes to another session on another workstation. > > > > So, on the brouser of the programmer that called test was show all it does > except the print 'et voil?' > > and on the brouser of a colleague that use Session to, magically appear 'et > voil?' > > > > Any Idea > > Villiam Manera > Dirett. Sistema Informativo > > Manifatture del Nord srl > viale Regina Elena 13-15 > 42100 Reggio Emilia RE > ITALY > > Tel. +39 0522 508200 > Fax +39 0522 514099 > email : vmanera at manord.com > www.pennyblack.com > > >
|