I'm writing a tool to do some binary file comparisons.
I'm opening the file using
fd=open(filename,'rb')
# Need to seek to 0x80 (hex 80th) location
fd.seek(0x80)
# Need to read just 8 bytes and get the result back in hex format.
x=fd.read(8)
print x
This prints out garbage. I would like to kno
k,thanks all.
l=map(lambda x: '%02x' %ord(x),d)
s=string.join(l,sep='')
PS#. Endedup learning little bit of Lambda functions. :-)
Scott David Daniels <<< Thanks for your wisdom about the "spaces".
Its a 3 liner code-snippet!
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 5, 9:24 am, Marco Mariani wrote:
> vibgyorbits wrote:
> > l=map(lambda x: '%02x' %ord(x),d)
> > s=string.join(l,sep='')
>
> > PS#. Endedup learning little bit of Lambda functions. :-)
>
> That's so 2007...
>
> The 2.5-esque wa