architecture-building-systems / revitpythonshell

An IronPython scripting environment for Autodesk Revit and Vasari
MIT License
494 stars 113 forks source link

Fix `raw_input` and `input` in interactive shell #9

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open the interactive shell
2. type `raw_input('prompt')
3. hit [ENTER]

What is the expected output? What do you see instead?
I expected to see the text "prompt" on a new line and the shell to accept some 
text from me.

Instead, the shell prints:

    >>> raw_input('prompt')
    prompt''
    >>> 

That is, the input is *not* read from the user, instead "prompt" is written to 
STDOUT and then an empty string is read from STDIN.

This happens with other IronPython interactive shells as well, for instance the 
Visual Studio plugin. It *doesn't* happen with the `ipy.exe` console 
application, though!

Original issue reported on code.google.com by dthomas.ch on 13 Nov 2011 at 10:49