I just found a well-hidden part of the behaviour you expected. vibgyorbits <bka...@gmail.com> writes:
> # Need to read just 8 bytes and get the result back in hex format. > x=fd.read(8) > print x Why would this print the bytes in hex format? “Convert to hexadecimal” is not the default text encoding for ‘print’. Instead, use the built-in ‘hex’ function to create a new string with the value of the bytes: bytes = fd.read(8) for byte in bytes: print hex(byte) If that's not sufficient, you'll need to be more explicit in describing what it is you want to do. -- \ “Pinky, are you pondering what I'm pondering?” “I think so, | `\ Brain, but if it was only supposed to be a three hour tour, why | _o__) did the Howells bring all their money?” —_Pinky and The Brain_ | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list