def generate_module(module_string, module_file):
file_changed = <NUM_LIT:1><EOL>if os.path.exists(module_file):<EOL><INDENT>f = open(module_file,'<STR_LIT:r>')<EOL>old_string = f.read()<EOL>f.close()<EOL>if old_string == module_string:<EOL><INDENT>file_changed = <NUM_LIT:0><EOL><DEDENT><DEDENT>if file_changed:<EOL><INDENT>f = open(module_file,'<STR_LIT:w>')<EOL>f.write(module_string)<EOL>f.close()<EOL><DEDENT>return module_file<EOL>
generate the source code file.  Only overwrite
        the existing file if the actual source has changed.