How to read one byte at a time in Python?

Peter Hansen peter at engcorp.com
Fri Mar 12 21:36:19 EST 2004


Anthony Liu wrote:

> Java has functions that read only one byte at a time,
> do we have such a function in python?

Skip assumed you meant during user input.  Is that what you meant, or 
did you mean during input from a file or something?  read(1) would do 
that, of course...

-Peter



More information about the Python-list mailing list