How to read one raw character at a time?

Jerome Quelin jerome.quelin at insalien.org
Sat Jul 15 12:05:52 EDT 2000


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.
What function should I call? Some sort of get_char(), or getc(), I
presume, but do Python provide them? If so, in which module?


Thanks,
Jerome
--
jerome.quelin at insalien.org




More information about the Python-list mailing list