This is similar to the code I tried to read a specific number of bytes from a file:
| CODE |
f.open("/home/rli/file") f.seek(4,0) f.tell() data = f.read(4) data |
I want it to read the first four bytes from a file, but it displays ' '. How do I read the first few bytes of a file? Any help is appreciated.