#NEWLINE# def run_qepcad( qepcad_cmd , qepcad_input ) : #NEWLINE# #INDENT# proc = subprocess . Popen ( qepcad_cmd , shell = True , stdin = subprocess . PIPE , stdout = subprocess . PIPE ) #NEWLINE# proc . stdin . write ( qepcad_input . encode ( ) ) #NEWLINE# out = proc . communicate ( ) #NEWLINE# outstr = out [ 0 ] . decode ( 'utf-8' ) #NEWLINE# outlines = outstr . splitlines ( ) #NEWLINE# return proc [ ( outlines . index ( 'An equivalent quantifier-free formula:' ) + 2 ) ]