Created
January 9, 2015 13:48
-
-
Save sbchisholm/56c11e01eef323185eea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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