[issue706263] print in pythonw raises silent exception when no console available

2013-10-13 Thread Georg Brandl

Georg Brandl added the comment:

I agree with Christian; closing as suggested.

--
nosy: +georg.brandl
status: pending -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue706263] print in pythonw raises silent exception when no console available

2013-06-26 Thread Christian Heimes

Christian Heimes added the comment:

I recommend against changing the code so late in the Python 2.7 release cycle. 
A change in behavior is too confusing.
And it's not a bug but a design decision, too. Over five years ago I implement 
parts of the IO interaction with the operating system for Python 3.0. I 
deliberately did NOT port modifications to 2.6.

If you want to get Python 3.x style print() behavior in Python 2.7 you can have 
it already:

from __future__ import print_function
import sys
if sys.executable.endswith("pythonw.exe"):
sys.stdout = sys.stdout = None

print("can handle sys.stdout = None just fine.")

--
nosy: +christian.heimes
resolution:  -> wont fix
stage:  -> committed/rejected
status: open -> pending
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue706263] print in pythonw raises silent exception when no console available

2013-06-26 Thread anatoly techtonik

anatoly techtonik added the comment:

This is still an issue for Python 2 users. Most important that pythonw.exe has 
a magic ability to fail silently leaving users with no means to create valid 
bug reports (the reason why StackOverflow questions are downvoted and erased).

http://bugs.ascend4.org/print_bug_page.php?bug_id=471
stream https://code.google.com/p/spyderlib/issues/detail?id=1260

The argument in msg15198 is somewhat misleading. If pythonw.exe fails because 
of print statement or because other issue, there is no way to report that.

Anyway, this reminds me very much of mod_wsgi, with only problem that Python 
developers don't receive as much feedback as Graham to make the change: 
http://blog.dscpl.com.au/2009/04/wsgi-and-printing-to-standard-output.html

--
nosy: +techtonik
title: print raises exception when no console available -> print in pythonw 
raises silent exception when no console available

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com