How to read one raw character at a time?
Moshe Zadka
moshez at math.huji.ac.il
Sat Jul 15 14:12:53 EDT 2000
On Sat, 15 Jul 2000, Jerome Quelin wrote:
> Hi all,
>
> When prompting a user for something, I would like to fetch and proceed
> his answer character by character, and not line by line. How should I
> do?
>
> sys.stdin.read(1) proceeds only when the user hits the return key,
> that's not what I want.
You haven't mentioned your OS, but if you're on UNIX, you better have
a look at the "curses" module.
--
Moshe Zadka <moshez at math.huji.ac.il>
There is no GOD but Python, and HTTP is its prophet.
http://advogato.org/person/moshez
More information about the Python-list
mailing list