#NEWLINE# def get_config_from_filename( self , filename ) : #NEWLINE# #INDENT# if ( not os . path . exists ( filename ) ) : #NEWLINE# #INDENT# raise RuntimeError ( ( "%r doesn't exist" % filename ) ) #NEWLINE# #UNINDENT# cfg = { #NEWLINE# #INDENT# '__builtins__' : __builtins__ , #NEWLINE# '__name__' : '__config__' , #NEWLINE# '__file__' : filename , #NEWLINE# '__doc__' : None , #NEWLINE# '__package__' : None , #NEWLINE# #UNINDENT# } #NEWLINE# try : #NEWLINE# #INDENT# execfile_ ( filename , cfg , cfg ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# print ( ( 'Failed to read config file: %s' % filename ) , file = sys . stderr ) #NEWLINE# traceback . print_exc ( ) #NEWLINE# sys . stderr . flush ( ) #NEWLINE# sys . exit ( 1 ) #NEWLINE# #UNINDENT# return cfg