Created
September 4, 2016 21:59
-
-
Save philpennock/0df738bc6861968b7d7b1e616a65a66d to your computer and use it in GitHub Desktop.
Convert hex-dump format (hh hh hh hh) to binary data: fast hack at REPL, for an HVIF file
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
#!/usr/bin/env python3 | |
import binascii | |
with open('foo.hvif', 'wb') as out: | |
out.write(binascii.unhexlify(b''.join(open('foo.hvif.txt', 'rb').read().split()))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment