def recompile(filename):
<EOL>import os<EOL>import imp<EOL>import marshal<EOL>import struct<EOL>f = open(filename, '<STR_LIT>')<EOL>try:<EOL><INDENT>timestamp = int(os.fstat(f.fileno()).st_mtime)<EOL><DEDENT>except AttributeError:<EOL><INDENT>timestamp = int(os.stat(filename).st_mtime)<EOL><DEDENT>codestring = f.read()<EOL>f.close()<EOL>if codestring and codestring[-<NUM_LIT:1>] != '<STR_LIT:\n>':<EOL><INDENT>codestring = codestring + '<STR_LIT:\n>'<EOL><DEDENT>try:<EOL><INDENT>codeobject = compile(codestring, filename, '<STR_LIT>')<EOL><DEDENT>except SyntaxError:<EOL><INDENT>print("<STR_LIT>" % filename, file=sys.stderr)<EOL>return<EOL><DEDENT>cod = Code.from_code(codeobject)<EOL>message = "<STR_LIT>" % filename<EOL>cod.code[:<NUM_LIT:0>] = [ <EOL>(LOAD_GLOBAL, '<STR_LIT>'),<EOL>(LOAD_CONST, '<STR_LIT>'),<EOL>(CALL_FUNCTION, <NUM_LIT:1>),<EOL>(LOAD_ATTR, '<STR_LIT>'),<EOL>(LOAD_ATTR, '<STR_LIT>'),<EOL>(LOAD_CONST, message),<EOL>(CALL_FUNCTION, <NUM_LIT:1>),<EOL>(POP_TOP, None),<EOL>]<EOL>codeobject2 = cod.to_code()<EOL>fc = open(filename+'<STR_LIT:c>', '<STR_LIT:wb>')<EOL>fc.write('<STR_LIT>')<EOL>fc.write(struct.pack('<STR_LIT>', timestamp))<EOL>marshal.dump(codeobject2, fc)<EOL>fc.flush()<EOL>fc.seek(<NUM_LIT:0>, <NUM_LIT:0>)<EOL>fc.write(imp.get_magic())<EOL>fc.close()<EOL>
Create a .pyc by disassembling the file and assembling it again, printing
    a message that the reassembled file was loaded.