#NEWLINE# def bin_run( self , bin ) : #NEWLINE# #INDENT# fullpath = ( ( basepath + '/bin/' ) + bin ) #NEWLINE# proc = subprocess . Popen ( fullpath , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) #NEWLINE# ( stdout , stderr ) = proc . communicate ( ) #NEWLINE# if proc . returncode : #NEWLINE# #INDENT# print ( ( 'Error executing %s:\n %s %s ' % ( bin , bin , stderr ) ) ) #NEWLINE# raise subprocess . CalledProcessError ( proc . returncode , bin )