Terry J. Reedy added the comment:
Good question. There are two issues when starting IDLE with pythonw.exe, so
that sys.__stderr__ and sys.stderr are initially None.
1. None.write is an attribute error that crashes Python. Therefore, don't do
that. Instead use print. By default, and when
anthony shaw added the comment:
Revisiting this issue as it's still open. The original patch was for 3.3a0,
there have been many changes to both IDLE and the Windows build since,
including the recent IDLE entry point in the new Windows installer.
Steve, Terry, please could you review to
Changes by Terry J. Reedy :
--
assignee: -> terry.reedy
stage: test needed -> patch review
versions: +Python 3.6, Python 3.7 -Python 2.7, Python 3.3, Python 3.4
___
Python tracker
Terry J. Reedy added the comment:
Idle start up seems unnecessarily fragmented into multiple files.
idlelib/__main__.py
idlelib/idle.py
idlelib/idlew.py
can all be started from the command line by name with either python or pythonw
or run once by import. idlelib/__main__.py can also be
Todd Rovito added the comment:
Terry,
Bottom line I can't seem to get this patch to do anything for me. Before
the patch is applied IDLE seems to be handling warnings and exceptions just
fine in PyShell on the Mac. I get no crash and the output matches the normal
console. Here is a
Dev Player added the comment:
I may be mistaken but I thought, as of not too long ago, that pythonw.exe is no
longer needed by current versions. 2.7.5
--
nosy: +devplayer
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13582
Terry J. Reedy added the comment:
No change. pythonw.exe is still present and in use.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13582
___
Terry J. Reedy added the comment:
Todd, do you have a Mac to test this on?
This patch treat sending messages to a widget as a backup option. In 18318 I
propose we make Idle a true gui app, with all messages other than 'No tkinter'
handled by the gui. Console writing, when available, would
Todd Rovito added the comment:
Yes I have a Mac and I am glad to help, so I gave it a test run tonight. The
first thing I did was apply the patch then I ran idle from the console like so:
./python.exe Lib/idlelib/idle.py
For testing I used a simple print command to print to stderr:
Terry J. Reedy added the comment:
Print in the user process goes to shell window. You need to stimulate (or just
add) print or warn in the idle process, which normally goes to console, or
nowhere. It is hard (intentionally, I am sure) to dynamically manipulate idle
process code. Roger said
Changes by Gabriel Genellina ggenell...@gmail.com:
--
nosy: +ggenellina
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13582
___
___
Changes by Terry J. Reedy tjre...@udel.edu:
--
versions: +Python 3.4 -Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13582
___
___
Changes by Andrew Svetlov andrew.svet...@gmail.com:
--
nosy: +asvetlov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13582
___
___
Changes by Terry J. Reedy tjre...@udel.edu:
--
nosy: +terry.reedy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13582
___
___
Python-bugs-list
Roger Serwy roger.se...@gmail.com added the comment:
I don't have a Mac to test against. Is there anything I need to do to improve
the patch?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13582
Roger Serwy roger.se...@gmail.com added the comment:
Here is a list of open issues that describe IDLE suddenly crashing, which can
be traced back to pythonw.exe:
#4765, #5707, #6257, #6739, #9404, #9925, #10365, #11437, #12274, #12988,
#13052, #13071, #13078, #13153
This patch does not fix
Ned Deily n...@acm.org added the comment:
IDLE.app on OS X also has the issue of stderr messages not being presented to
users unless you know to look in the system log where they get written. So
writing to stderr is not fatal but displaying them in a popup would be an
improvement.
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
terminate abruptly? I thought that print(file=None) silently returned,
without printing but without an error.
A delayed popup to display (otherwise discarded) output is a nice feature,
though.
--
nosy: +amaury.forgeotdarc
Roger Serwy roger.se...@gmail.com added the comment:
You can try triggering bug #8900 quite simply. From a shell or an editor, press
Ctrl+N and then Ctrl+O. Open a file and watch IDLE terminate abruptly.
Also, see #12274.
If you want to play with this problem further, try adding a raise
New submission from Roger Serwy roger.se...@gmail.com:
Running IDLE on Windows typically uses pythonw.exe. Unfortunately any error
messages written to stderr will cause IDLE to terminate abruptly without an
error message. This is due to __stderr__ == None.
Attached is a patch against 3.3a0
20 matches
Mail list logo