C:\Users\AndrewBC\Desktop>python Python 2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> i_file = open('f_madison_sucks.txt', mode='rb') >>> o_file = open('f_madison_blows.jpg', mode='wb') >>> import binascii >>> import string >>> d_table = string.maketrans(string.hexdigits, ' '*len(string.hexdigits)) >>> o_file.write(binascii.unhexlify(i_file.read().translate(None, d_table))) >>> exit()