#NEWLINE# def exec_file( self , path ) : #NEWLINE# #INDENT# "execute the lines in the local file 'path'" #NEWLINE# filename = os . path . basename ( path ) #NEWLINE# log . info ( 'Execute %s' , filename ) #NEWLINE# fil = open ( path , 'r' ) #NEWLINE# res = '> ' #NEWLINE# for line in fil : #NEWLINE# #INDENT# line = line . rstrip ( '\r\n' ) #NEWLINE# retlines = ( res + self . __exchange ( line ) ) . splitlines ( ) #NEWLINE# res = retlines . pop ( ) #NEWLINE# for lin in retlines : #NEWLINE# #INDENT# log . info ( self ) #NEWLINE# #UNINDENT# #UNINDENT# log . info ( res ) #NEWLINE# fil . close ( )