How to read one byte at a time in Python?

Peter Hansen peter at
Sat Mar 13 03:36:19 CET 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...


More information about the Python-list mailing list