This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients orsenthil, sven.siegmund, terry.reedy
Date 2008-08-10.18:05:55
SpamBayes Score 1.5826735e-06
Marked as misclassified No
Message-id <1218391557.1.0.927808133456.issue2827@psf.upfronthosting.co.za>
In-reply-to
Content
When one runs a file with Python30.exe, it opens a window, runs the
file, and closes the window too fast to see what happened.  The point of
the input() statements is to 'pause' execution.  This is standard
debugging along with print()/write() statements.  With three input()s, I
determined that CPython compiled the file, executed the def statement,
and failed the function call (due, I presume, to the requested disk file
not being present).  IDLE, on the other hand, crashed before getting to
the first input() before the function def.  So it crashed while
compiling the file -- or as a result of trying to execute input().

I just tried cut and paste into the IDLE shell window (without the
encoding cookie) and it runs as expected, giving
IOError: [Errno 2] No such file or directory: 'slovník.txt'
Retrying with the cookie gives the same.  I have no idea if it is
recognized in interactive mode or if interactive mode is utf8 by default.

I just tried running from a file without the coding line and IDLE
crashed again.  So the problem is reading from a file on Windows.

IDLE is doing *something* different than bare CPython.  Actually, it
uses pythonw30.exe rather that python.exe, but when I replace the input
statements with file write statements (input raises error with pythonw),
pythonw also executed through to the def statement. But I still suspect
something in the interaction between IDLE and pythonw.  There was a
another problem with IDLE and pythonw in .a5
http://bugs.python.org/issue2841 
which seems to have disappeared without being officially fixed.
History
Date User Action Args
2008-08-10 18:05:57terry.reedysetrecipients: + terry.reedy, orsenthil, sven.siegmund
2008-08-10 18:05:57terry.reedysetmessageid: <1218391557.1.0.927808133456.issue2827@psf.upfronthosting.co.za>
2008-08-10 18:05:56terry.reedylinkissue2827 messages
2008-08-10 18:05:55terry.reedycreate