def compile_controllers(folder):
 path = pjoin(folder, 'controllers')
 for fname in listdir(path, '.+\\.py$'):
  data = read_file(pjoin(path, fname))
  exposed = find_exposed_functions(data)
  for function in exposed:
   command = (data + ('\nresponse._vars=response._caller(%s)\n' % function))
   filename = pjoin(folder, 'compiled', ('controllers.%s.%s.py' % (fname[:(-3)], function)))
   write_file(filename, command)
   save_pyc(filename)
   os.unlink(filename)

def compile_controllers ( folder ) : path = pjoin ( folder , 'controllers' ) for fname in listdir ( path , '.+\\.py$' ) : data = read_file ( pjoin ( path , fname ) ) exposed = find_exposed_functions ( data ) for function in exposed : command = ( data + ( '\nresponse._vars=response._caller(%s)\n' % function ) ) filename = pjoin ( folder , 'compiled' , ( 'controllers.%s.%s.py' % ( fname [ : ( - 3 ) ] , function ) ) ) write_file ( filename , command ) save_pyc ( filename ) os . unlink ( filename )
compiles all the controllers in the application specified by folder .