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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Vizcayno
Sent: Monday, December 17, 2007 6:06 PM
To: [email protected]
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
''

Regards.
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to