#NEWLINE# def generate_module( module_string , module_file ) : #NEWLINE# #INDENT# ' generate the source code file.  Only overwrite\n        the existing file if the actual source has changed.\n    ' #NEWLINE# file_changed = 1 #NEWLINE# if os . path . exists ( module_file ) : #NEWLINE# #INDENT# f = open ( module_file , 'r' ) #NEWLINE# old_string = f . read ( ) #NEWLINE# f . close ( ) #NEWLINE# if ( old_string == module_string ) : #NEWLINE# #INDENT# file_changed = 0 #NEWLINE# #UNINDENT# #UNINDENT# if file_changed : #NEWLINE# #INDENT# f = open ( module_file , 'w' ) #NEWLINE# f . write ( module_string ) #NEWLINE# f . close ( ) #NEWLINE# #UNINDENT# return module_file