[Python-Dev] WSGI paranoia with stdout/stderr

Antoine Pitrou solipsis at pitrou.net
Sun May 13 13:09:19 CEST 2012


On Sun, 13 May 2012 14:02:50 +0300
anatoly techtonik <techtonik at gmail.com> wrote:
> There is fear and uncertainty in this pull request to PyPI -
> https://bitbucket.org/techtonik/pypi-techtonik/changeset/5396f8c60d49#comment-18915
> - which is about that writing to stderr _might_ break things in WSGI
> applications.
> 
> As a consequence logging to console will not be accepted in debug
> mode, which is disappointing, but not as disappointing as the absence
> of proper explanation. Martin couldn't provide any grounds for his
> fears, so I am asking fellow Python developers if anybody remember "if
> writing to stderr can break things in generic WSGI application" and
> reassure Martin that everything will be ok.

According to this blog post, writing to stderr is fine (stdout is not):
http://blog.dscpl.com.au/2009/04/wsgi-and-printing-to-standard-output.html

Regards

Antoine.




More information about the Python-Dev mailing list