<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-2363643920942057324.post1907691383491678344..comments</id><updated>2010-03-24T08:58:50.967+11:00</updated><category term='apache'/><category term='mod_python'/><category term='fastcgi'/><category term='web2py'/><category term='mod_wsgi'/><category term='django'/><category term='python'/><category term='nginx'/><category term='wsgi'/><category term='pycon'/><category term='new relic'/><title type='text'>Comments on Graham Dumpleton: WSGI and printing to standard output.</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.dscpl.com.au/feeds/1907691383491678344/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2363643920942057324/1907691383491678344/comments/default'/><link rel='alternate' type='text/html' href='http://blog.dscpl.com.au/2009/04/wsgi-and-printing-to-standard-output.html'/><author><name>Graham Dumpleton</name><uri>http://www.blogger.com/profile/13609779138164842374</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2363643920942057324.post-7249210109052106123</id><published>2010-03-24T08:58:50.957+11:00</published><updated>2010-03-24T08:58:50.957+11:00</updated><title type='text'>Jon, the documentation at &amp;#39;http://code.google....</title><summary type='text'>Jon, the documentation at &amp;#39;http://code.google.com/p/modwsgi/wiki/DebuggingTechniques&amp;#39; mentions &amp;#39;wsgi.errors&amp;#39;. The problem is that most frameworks hide it or it is non obvious how to get access to it. Even more, practically no one realises it is there and uses it and they always just use &amp;#39;print&amp;#39; without even redirecting it. The &amp;#39;wsgi.errors&amp;#39; stream is also not </summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2363643920942057324/1907691383491678344/comments/default/7249210109052106123'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2363643920942057324/1907691383491678344/comments/default/7249210109052106123'/><link rel='alternate' type='text/html' href='http://blog.dscpl.com.au/2009/04/wsgi-and-printing-to-standard-output.html?showComment=1269381530957#c7249210109052106123' title=''/><author><name>Graham Dumpleton</name><uri>http://www.blogger.com/profile/13609779138164842374</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='06276936539328058414'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.dscpl.com.au/2009/04/wsgi-and-printing-to-standard-output.html' ref='tag:blogger.com,1999:blog-2363643920942057324.post-1907691383491678344' source='http://www.blogger.com/feeds/2363643920942057324/posts/default/1907691383491678344' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-19731307'/></entry><entry><id>tag:blogger.com,1999:blog-2363643920942057324.post-3412662911404310539</id><published>2010-03-24T05:41:35.469+11:00</published><updated>2010-03-24T05:41:35.469+11:00</updated><title type='text'>Your suggested &amp;quot;portable&amp;quot; version of

  ...</title><summary type='text'>Your suggested &amp;quot;portable&amp;quot; version of&lt;br /&gt;&lt;br /&gt;  print &amp;gt;&amp;gt; sys.stderr, &amp;#39;message ...&amp;#39;&lt;br /&gt;&lt;br /&gt;is no more portable than the&lt;br /&gt;&lt;br /&gt;  print &amp;#39;message ...&amp;#39;&lt;br /&gt;&lt;br /&gt;than it&amp;#39;s replacing.&lt;br /&gt;&lt;br /&gt;It should be:&lt;br /&gt;&lt;br /&gt;  environ[&amp;#39;wsgi.errors&amp;#39;].write(&amp;#39;message ...&amp;#39;)</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2363643920942057324/1907691383491678344/comments/default/3412662911404310539'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2363643920942057324/1907691383491678344/comments/default/3412662911404310539'/><link rel='alternate' type='text/html' href='http://blog.dscpl.com.au/2009/04/wsgi-and-printing-to-standard-output.html?showComment=1269369695469#c3412662911404310539' title=''/><author><name>Jon R</name><uri>http://www.blogger.com/profile/03497697160000491775</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.dscpl.com.au/2009/04/wsgi-and-printing-to-standard-output.html' ref='tag:blogger.com,1999:blog-2363643920942057324.post-1907691383491678344' source='http://www.blogger.com/feeds/2363643920942057324/posts/default/1907691383491678344' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1596715313'/></entry><entry><id>tag:blogger.com,1999:blog-2363643920942057324.post-7826295722087058136</id><published>2009-09-29T09:51:25.655+10:00</published><updated>2009-09-29T09:51:25.655+10:00</updated><title type='text'>For Google people that find this post in the futur...</title><summary type='text'>For Google people that find this post in the future, a cause of:&lt;br /&gt;&lt;br /&gt;&amp;quot;sys.stdin access restricted by mod_wsgi&amp;quot; when moving from dev to production is because of an errant:&lt;br /&gt;&lt;br /&gt;import pdb; pdb.set_trace();&lt;br /&gt;&lt;br /&gt;Frustratingly, wsgi will throw an error from the NEXT line so you won&amp;#39;t know that pdb caused it :-)</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2363643920942057324/1907691383491678344/comments/default/7826295722087058136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2363643920942057324/1907691383491678344/comments/default/7826295722087058136'/><link rel='alternate' type='text/html' href='http://blog.dscpl.com.au/2009/04/wsgi-and-printing-to-standard-output.html?showComment=1254181885655#c7826295722087058136' title=''/><author><name>Adam N</name><uri>http://www.blogger.com/profile/05467513014255779396</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.dscpl.com.au/2009/04/wsgi-and-printing-to-standard-output.html' ref='tag:blogger.com,1999:blog-2363643920942057324.post-1907691383491678344' source='http://www.blogger.com/feeds/2363643920942057324/posts/default/1907691383491678344' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1817168676'/></entry><entry><id>tag:blogger.com,1999:blog-2363643920942057324.post-7643367939420766906</id><published>2009-04-04T19:48:00.000+11:00</published><updated>2009-04-04T19:48:00.000+11:00</updated><title type='text'>@Deron&lt;br&gt;&lt;br&gt;The issue isn't to have the messages...</title><summary type='text'>@Deron&lt;BR/&gt;&lt;BR/&gt;The issue isn't to have the messages logged to stdout to vanish, it is to get people to log them to the proper output stream, which is stderr.&lt;BR/&gt;&lt;BR/&gt;One thing that both yours and the other response show is that even people who have some experience with Python development don't necessarily understand the greater issues around this. So, what hope is there for an absolute newbie </summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2363643920942057324/1907691383491678344/comments/default/7643367939420766906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2363643920942057324/1907691383491678344/comments/default/7643367939420766906'/><link rel='alternate' type='text/html' href='http://blog.dscpl.com.au/2009/04/wsgi-and-printing-to-standard-output.html?showComment=1238834880000#c7643367939420766906' title=''/><author><name>Graham Dumpleton</name><uri>http://www.blogger.com/profile/13609779138164842374</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='06276936539328058414'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.dscpl.com.au/2009/04/wsgi-and-printing-to-standard-output.html' ref='tag:blogger.com,1999:blog-2363643920942057324.post-1907691383491678344' source='http://www.blogger.com/feeds/2363643920942057324/posts/default/1907691383491678344' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-19731307'/></entry><entry><id>tag:blogger.com,1999:blog-2363643920942057324.post-3883508949001430528</id><published>2009-04-04T19:45:00.000+11:00</published><updated>2009-04-04T19:45:00.000+11:00</updated><title type='text'>@garylinux&lt;br&gt;&lt;br&gt;It isn't just debug code we are ...</title><summary type='text'>@garylinux&lt;BR/&gt;&lt;BR/&gt;It isn't just debug code we are talking about here, it could be quite valid error messages which the application wants to log to the error log file, but people have wrongly used 'print' by itself to send it to stdout instead of stderr. Any WSGI framework library which used stdout for logging error messages would fail to work properly if used with a WSGI application hosted by a</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2363643920942057324/1907691383491678344/comments/default/3883508949001430528'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2363643920942057324/1907691383491678344/comments/default/3883508949001430528'/><link rel='alternate' type='text/html' href='http://blog.dscpl.com.au/2009/04/wsgi-and-printing-to-standard-output.html?showComment=1238834700000#c3883508949001430528' title=''/><author><name>Graham Dumpleton</name><uri>http://www.blogger.com/profile/13609779138164842374</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='06276936539328058414'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.dscpl.com.au/2009/04/wsgi-and-printing-to-standard-output.html' ref='tag:blogger.com,1999:blog-2363643920942057324.post-1907691383491678344' source='http://www.blogger.com/feeds/2363643920942057324/posts/default/1907691383491678344' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-19731307'/></entry><entry><id>tag:blogger.com,1999:blog-2363643920942057324.post-5049754301346152962</id><published>2009-04-04T05:36:00.000+11:00</published><updated>2009-04-04T05:36:00.000+11:00</updated><title type='text'>What about providing a third option, a data sink, ...</title><summary type='text'>What about providing a third option, a data sink, like /dev/null.  Provide a fake stdout file object that instead of raising an error or sending the output back to CGI, it just silently discards it.  Maybe&lt;BR/&gt;&lt;BR/&gt;  WSGIRestrictStdin Discard&lt;BR/&gt;&lt;BR/&gt;This could also help in those situations where you have to use a third-party module, that unfortunately sometimes does a stray print.</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2363643920942057324/1907691383491678344/comments/default/5049754301346152962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2363643920942057324/1907691383491678344/comments/default/5049754301346152962'/><link rel='alternate' type='text/html' href='http://blog.dscpl.com.au/2009/04/wsgi-and-printing-to-standard-output.html?showComment=1238783760000#c5049754301346152962' title=''/><author><name>Deron</name><uri>http://www.blogger.com/profile/18332381064910373026</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.dscpl.com.au/2009/04/wsgi-and-printing-to-standard-output.html' ref='tag:blogger.com,1999:blog-2363643920942057324.post-1907691383491678344' source='http://www.blogger.com/feeds/2363643920942057324/posts/default/1907691383491678344' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-430463781'/></entry><entry><id>tag:blogger.com,1999:blog-2363643920942057324.post-8318817464445748231</id><published>2009-04-04T03:21:00.000+11:00</published><updated>2009-04-04T03:21:00.000+11:00</updated><title type='text'>I am trying hard to figure out why I should care i...</title><summary type='text'>I am trying hard to figure out why I should care if my debugging code is cross system compatible. Its debugging code, written to run on the system I am working on right now.&lt;BR/&gt;It's going to be gone once the bug is tracked down.&lt;BR/&gt;&lt;BR/&gt;The WSGIRestrictStdin Off&lt;BR/&gt;WSGIRestrictStdout Off&lt;BR/&gt; settings would be much more useful for developers if they would work in the .htaccess&lt;BR/&gt;Since (I </summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2363643920942057324/1907691383491678344/comments/default/8318817464445748231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2363643920942057324/1907691383491678344/comments/default/8318817464445748231'/><link rel='alternate' type='text/html' href='http://blog.dscpl.com.au/2009/04/wsgi-and-printing-to-standard-output.html?showComment=1238775660000#c8318817464445748231' title=''/><author><name>garylinux</name><uri>http://www.blogger.com/profile/03682928140340344602</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.dscpl.com.au/2009/04/wsgi-and-printing-to-standard-output.html' ref='tag:blogger.com,1999:blog-2363643920942057324.post-1907691383491678344' source='http://www.blogger.com/feeds/2363643920942057324/posts/default/1907691383491678344' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1960971500'/></entry><entry><id>tag:blogger.com,1999:blog-2363643920942057324.post-1815019223796785652</id><published>2009-04-03T22:36:00.000+11:00</published><updated>2009-04-03T22:36:00.000+11:00</updated><title type='text'>I'm sorry to see you having to make this change to...</title><summary type='text'>I'm sorry to see you having to make this change to appeal to the unwashed masses who can't read documentation. I will certainly turn that feature back on in mod_wsgi 3.0.</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2363643920942057324/1907691383491678344/comments/default/1815019223796785652'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2363643920942057324/1907691383491678344/comments/default/1815019223796785652'/><link rel='alternate' type='text/html' href='http://blog.dscpl.com.au/2009/04/wsgi-and-printing-to-standard-output.html?showComment=1238758560000#c1815019223796785652' title=''/><author><name>Brian Morton</name><uri>http://www.blogger.com/profile/16388548951301223476</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.dscpl.com.au/2009/04/wsgi-and-printing-to-standard-output.html' ref='tag:blogger.com,1999:blog-2363643920942057324.post-1907691383491678344' source='http://www.blogger.com/feeds/2363643920942057324/posts/default/1907691383491678344' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-228712469'/></entry><entry><id>tag:blogger.com,1999:blog-2363643920942057324.post-5123076841878247651</id><published>2009-04-03T22:35:00.000+11:00</published><updated>2009-04-03T22:35:00.000+11:00</updated><title type='text'></title><summary type='text'>This comment has been removed by the author.</summary><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2363643920942057324/1907691383491678344/comments/default/5123076841878247651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2363643920942057324/1907691383491678344/comments/default/5123076841878247651'/><author><name>Brian Morton</name><uri>http://www.blogger.com/profile/16388548951301223476</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.dscpl.com.au/2009/04/wsgi-and-printing-to-standard-output.html' ref='tag:blogger.com,1999:blog-2363643920942057324.post-1907691383491678344' source='http://www.blogger.com/feeds/2363643920942057324/posts/default/1907691383491678344' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.contentRemoved' value='true'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-228712469'/></entry></feed>
