def _load_file(filename):
 fp = open(filename, 'rb')
 source = (fp.read() + '\n')
 try:
  co = compile(source, filename, 'exec')
 except SyntaxError:
  print >>sys.stderr, '>>Syntax error in', filename
  raise
 fp.close()
 return co

def _load_file ( filename ) : fp = open ( filename , 'rb' ) source = ( fp . read ( ) + '\n' ) try : co = compile ( source , filename , 'exec' ) except SyntaxError : print >> sys . stderr , '>>Syntax error in' , filename raise fp . close ( ) return co
load a python source file and compile it to byte-code _load_module: code_object filename: name of file containing python source code code_object: code_object compiled from this source code this function does not write any file! .