vegetax wrote:
> How can i use cgi'like print statement in a multitreaded web framework?
> each thread has its own Servlet instance with request/response objects,
> sys.stdout = self.response(which is a file like object) wont work because
> all threads will set the same file object and it will be a concurrence
> mess.
> 
> I am out of ideas here,so any hacks welcome =)
> 

instead of:

    print "<html>.....</html>

do:

    print >>self.response, "<html>....</html>"


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

Reply via email to