GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing learning-python.com — learning-python.com # dumpfile.py
# hex dump file listed on command line
import sys
bytes = open(sys.argv[1], 'rb').read()
print '-'*40
print repr(bytes)
print '-'*40
i = 0
while bytes:
print '[%06d] ' % i,
bytes, chunk = bytes[4:], bytes[:4] # show 4-bytes per line
for c in chunk: print hex(ord(c)), '\t', # show hex of binary value
print
i += 4
print '-'*40
##for line in open(sys.argv[1], 'rb').readlines():
## print repr(line)
|
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |