[issue12020] Attribute error with flush on stdout,stderr

2019-03-15 Thread Mark Lawrence
Change by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue12020] Attribute error with flush on stdout,stderr

2015-06-01 Thread Martin Panter
Martin Panter added the comment: I wouldn’t expect to see a message for stderr because there is nowhere else to send the message. However with my patch for Issue 5319, at least we get a non-zero exit status. Brandon: I agree this should be under sys.stdin/out/err; I wasn’t saying to put it un

[issue12020] Attribute error with flush on stdout,stderr

2015-06-01 Thread Brandon Milam
Brandon Milam added the comment: I've been looking over the issue and the error is just raised by the stdout change not the stderr change (when the stdout line is commented out in the setAutoFlush function no error is raised). The flush method doesn't seem to be required as Serhiy pointed out

[issue12020] Attribute error with flush on stdout,stderr

2015-05-19 Thread Martin Panter
Martin Panter added the comment: The documentation already says that “stdout” and friends are meant to be text files, and that they may be replaced with file-like objects like StringIO. Perhaps the documentation could be more explicit about what text file API is required internally (either Tex

[issue12020] Attribute error with flush on stdout,stderr

2014-10-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Since 29ba6c399090 stdout and stderr flush upon exit. But any errors on flushing were swallowed. Since 4ca497f4819c (issue5319) an error is printed if stdout flushing fails. FlushFile doesn't provide all methods and attributes of io.TextIOBase. But it is no

[issue12020] Attribute error with flush on stdout,stderr

2014-07-15 Thread Mark Lawrence
Mark Lawrence added the comment: With 3.4.1 and similarly with 3.5.0a0 I get Testing python 3.4 C:\python34\python.exe: can't open file 'attributeError.py': [Errno 2] No such file or directory Traceback (most recent call last): File "C:\Users\Mark\MyPython\mytest.py", line 34, in output

[issue12020] Attribute error with flush on stdout,stderr

2011-05-06 Thread James Hutchison
James Hutchison added the comment: You are right, when I add: def flush(self): pass; the error goes away. When I have this: def flush(): pass; I get: Exception TypeError: 'flush() takes no arguments (1 given)' in <__main__.FlushFile object at 0x00C2AB70> ignored T

[issue12020] Attribute error with flush on stdout,stderr

2011-05-06 Thread R. David Murray
R. David Murray added the comment: Hmm. That error message is more than a bit misleading. What you need to do is add a flush method to your FlushFile class. Something changed between 3.1 and 3.2 that causes that message to be generated instead of suppressed. Not sure what it was. The sur

[issue12020] Attribute error with flush on stdout,stderr

2011-05-06 Thread James Hutchison
New submission from James Hutchison : When upgrading from Python 3.1 to Python 3.2 I noticed that when my program closed it printed out a non-consequential AttributeError Exception. My program had a custom class that replaced stdout and stderr for use in a piped program (it flushed the buffer