Wait for a keypress before continuing?

Chris Angelico rosuav at gmail.com
Thu Aug 18 00:10:38 CEST 2011


On Wed, Aug 17, 2011 at 7:29 PM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
> The raw_input/input UI is well-designed for entering plain text data. It is
> extremely poor as a command interface.
>
> ... (Imagine how awkward it would be to use a TUI mail client or
> text editor where the only user input was from something like raw_input.)

I run a MUD and play several. MUDs by definition have only line-based
input (if you use a raw TELNET client, you have character-based input,
but most MUD clients send entire lines of text at once); yet it is
possible to implement a reasonably-viable file editor. It's not
difficult to become quite proficient with line-based editors,
especially if you rig some client-side support (which I have done on
two of the MUDs).

Line-based input is excellent as a command interface, if commands
consist of verbs and parameters. It's terrible for playing Tetris on.

ChrisA



More information about the Python-list mailing list