#NEWLINE# def do_run( self , args ) : #NEWLINE# #INDENT# args = args . split ( ) #NEWLINE# if ( len ( args ) == 0 ) : #NEWLINE# #INDENT# self . __error ( 'Expecting: run <filename>' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( not os . path . exists ( args [ 0 ] ) ) : #NEWLINE# #INDENT# self . __error ( ( 'File %s was not found' % args [ 0 ] ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# with open ( args [ 0 ] ) as f : #NEWLINE# #INDENT# lines = f . read ( ) . split ( '\n' ) #NEWLINE# #UNINDENT# for line in line : #NEWLINE# #INDENT# self . onecmd ( line )