parameters: (source, filename, mode, flags=None, dont_inherit=None)
return_statement: return gen.code
docstring: Replacement for builtin compile() function
docstring_summary: Replacement for builtin compile() function
docstring_tokens: Replacement for builtin compile () function
function: def compile(source, filename, mode, flags=None, dont_inherit=None):
      """Replacement for builtin compile() function"""
      if flags is not None or dont_inherit is not None:
          raise RuntimeError, "not implemented yet"
  
      if mode == "single":
          gen = Interactive(source, filename)
      elif mode == "exec":
          gen = Module(source, filename)
      elif mode == "eval":
          gen = Expression(source, filename)
      else:
          raise ValueError("compile() 3rd arg must be 'exec' or "
                           "'eval' or 'single'")
      gen.compile()
      return gen.code
function_tokens: def compile ( source , filename , mode , flags = None , dont_inherit = None ) : if flags is not None or dont_inherit is not None : raise RuntimeError , "not implemented yet" if mode == "single" : gen = Interactive ( source , filename ) elif mode == "exec" : gen = Module ( source , filename ) elif mode == "eval" : gen = Expression ( source , filename ) else : raise ValueError ( "compile() 3rd arg must be 'exec' or " "'eval' or 'single'" ) gen . compile ( ) return gen . code