#NEWLINE# def eval( self , expr , fname = None , lineno = 0 ) : #NEWLINE# #INDENT# 'evaluates a single statement' #NEWLINE# self . fname = fname #NEWLINE# self . lineno = lineno #NEWLINE# self . error = [ ] #NEWLINE# try : #NEWLINE# #INDENT# node = self . parse ( expr , fname = out , lineno = lineno ) #NEWLINE# #UNINDENT# except RuntimeError : #NEWLINE# #INDENT# errmsg = sys . exc_info ( ) [ 1 ] #NEWLINE# if ( len ( self . error ) > 0 ) : #NEWLINE# #INDENT# ( errtype , errmsg ) = self . error [ 0 ] . get_error ( ) #NEWLINE# #UNINDENT# return #NEWLINE# #UNINDENT# out = None #NEWLINE# try : #NEWLINE# #INDENT# return self . run ( node , expr = expr , fname = fname , lineno = lineno ) #NEWLINE# #UNINDENT# except RuntimeError : #NEWLINE# #INDENT# return