I know this question has obviously come up but I am having a little
problem. According to the author of mod_wsgi, web.py should not
"hijack" sys.stdout (and hence print). I installed Apache/mod_wsgi2.5
and web 3.X on my Windows machine. When I include the print statement
I get this error:

[Sat Sep 05 23:13:13 2009] [error] [client 127.0.0.1] File does not
exist: C:/Users/ryan/www/favicon.ico
[Sat Sep 05 23:13:13 2009] [error] [client 127.0.0.1] Traceback (most
recent call last):
[Sat Sep 05 23:13:13 2009] [error] [client 127.0.0.1]   File "c:\
\python26\\lib\\site-packages\\web.py-0.32-py2.6.egg\\web\
\application.py", line 242, in process
[Sat Sep 05 23:13:13 2009] [error] [client 127.0.0.1]     return
self.handle()
[Sat Sep 05 23:13:13 2009] [error] [client 127.0.0.1]   File "c:\
\python26\\lib\\site-packages\\web.py-0.32-py2.6.egg\\web\
\application.py", line 233, in handle
[Sat Sep 05 23:13:13 2009] [error] [client 127.0.0.1]     return
self._delegate(fn, self.fvars, args)
[Sat Sep 05 23:13:13 2009] [error] [client 127.0.0.1]   File "c:\
\python26\\lib\\site-packages\\web.py-0.32-py2.6.egg\\web\
\application.py", line 412, in _delegate
[Sat Sep 05 23:13:13 2009] [error] [client 127.0.0.1]     return
handle_class(cls)
[Sat Sep 05 23:13:13 2009] [error] [client 127.0.0.1]   File "c:\
\python26\\lib\\site-packages\\web.py-0.32-py2.6.egg\\web\
\application.py", line 387, in handle_class
[Sat Sep 05 23:13:13 2009] [error] [client 127.0.0.1]     return tocall
(*args)
[Sat Sep 05 23:13:13 2009] [error] [client 127.0.0.1]   File "C:/Users/
ryan/www/wsgi/todo.cgi", line 11, in GET
[Sat Sep 05 23:13:13 2009] [error] [client 127.0.0.1]     for c in
xrange(int(i.times)): print 'Hello,', name+'!'
[Sat Sep 05 23:13:13 2009] [error] [client 127.0.0.1] IOError:
sys.stdout access restricted by mod_wsgi

This makes sense and is part of the mod_wsgi docs. But what do I do
about it? There is an Apache Directive to turn this error off but it
still writes all data sent to stdout in the log which I definitely
don't want...so....

Should I build a string and return it?

Should I use some other module (FastCGI)?

Cheers,
Ryan Kaskel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to