How to read one byte at a time in Python?
Anthony Liu
antonyliu2002 at yahoo.com
Sat Mar 13 03:29:09 EST 2004
Yes, during file input, I think that read(1) should
satisfy my needs. Although in some cases, I will have
to do read(2) for Chinese characters.
Thanks
--- Peter Hansen <peter at engcorp.com> wrote:
> 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
> --
> http://mail.python.org/mailman/listinfo/python-list
__________________________________
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
http://mail.yahoo.com
More information about the Python-list
mailing list