SyntaxFix
Write A Post
Hire A Developer
Questions
When doing binary I/O the following method is useful:
while f.read(1): f.seek(-1,1) # whatever
The advantage is that sometimes you are processing a binary stream and do not know in advance how much you will need to read.