[IronPython] raw_input seems to hang (for winXP ipy 2.0a6)

Dino Viehland dinov at exchange.microsoft.com
Tue Dec 18 19:53:39 CET 2007

Ok, I've tracked this issue down - and thanks for the bug report (sorry we missed it the 1st time).

The problem here is that in PythonTextCRLFReader.ReadBuffer (which is used by PythonFile) we call "ReadBlock" instead of "Read".  This causes the input to block until a 20-character buffer is exhausted.  On Unix we use PythonTextLFReader which is doing the right thing and calling Read instead of ReadBlock - which explains why this works for Seo.

I've opened bug #14457 for this (http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=14457) but it'll be fixed shortly.  It's too late for the next IronPython release but it should be in the one after that.  If you want to work around it you can always re-build IronPython w/ the one line fix.

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Vizcayno
Sent: Monday, December 17, 2007 6:06 PM
To: users at lists.ironpython.com
Subject: [IronPython] raw_input seems to hang (for winXP ipy 2.0a6)

Try this:

>>> test_save = raw_input('[T]est [S]ave?: ')
[T]est [S]ave?: S

No answer is received, it hangs until you repeat typing the Enter key
(9 or more times). After that, raw-input behaves in another way:
>>> test_save = raw_input('[T]est [S]ave?: ')
[T]est [S]ave?: >>>

Value of test_save is:
>>> test_save

Users mailing list
Users at lists.ironpython.com

More information about the Ironpython-users mailing list