Skip to content

Instantly share code, notes, and snippets.

@sbchisholm
Created January 9, 2015 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sbchisholm/56c11e01eef323185eea to your computer and use it in GitHub Desktop.
Save sbchisholm/56c11e01eef323185eea to your computer and use it in GitHub Desktop.
import struct
import sys
def main():
print 'file:', sys.argv[1]
with open(sys.argv[1], 'r') as dat_file:
print 'count:', struct.unpack('=I', dat_file.read(4))
for i in xrange(10):
print struct.unpack('=d', dat_file.read(8))
if __name__ == "__main__":
if len(sys.argv) < 2:
sys.exit(-1)
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment