[Tutor] On a looping input, subsequent inputs are hidden

eryksun eryksun at gmail.com
Tue Jun 11 18:55:12 CEST 2013


On Tue, Jun 11, 2013 at 2:17 AM, Jim Mooney <cybervigilante at gmail.com> wrote:
>
> But the Second and subsequent inputs, in Windows, hide the input with
> dots, while the first shows the input, and I can't figure out why. I
> don't change a thing between the first and subsequent calls to input
> except changing the input message to an error message.

I don't understand what you mean by "hide the input with dots". Are
you running in a plain console window? (i.e. not IPython Qt console,
or Console2, or ConEmu -- let's keep it basic.)  Please paste the
output in a reply, so everyone can see what you're describing here.

>         Sorry,that's not an integer. Try again or Cancel by
>         using Cancel in a GUI window, or Ctrl-Z in DOS.
>         or Ctrl-C in Linux. One mo try. Type an integer: '''
>     except (KeyboardInterrupt, EOFError):
>     #1st Except for GUI, 2nd for Cmd window

By GUI window do you mean an IDE?

You should be able to reliably use Ctrl-C with input() in a Windows
console. Issue 17619 was resolved in 3.3.2:

http://docs.python.org/release/3.3.2/whatsnew/changelog.html

P.S. You're running Windows, not DOS. The Windows console is a
character-cell window, but otherwise console applications are regular
Windows programs. In a GUI app you can even open a console with
kernel32 AllocConsole() and open CONIN$ and CONOUT$ for standard I/O.


More information about the Tutor mailing list