#NEWLINE# def run_vncdo( self , commands , exitcode = 0 ) : #NEWLINE# #INDENT# cmd = ( 'vncdo -s :10 ' + commands ) #NEWLINE# vnc = pexpect . spawn ( cmd , logfile = sys . stdout , timeout = 5 ) #NEWLINE# vnc . logfile_read = sys . stdout #NEWLINE# vnc . expect ( pexpect . EOF ) #NEWLINE# if vnc . isalive ( ) : #NEWLINE# #INDENT# vnc . wait ( ) #NEWLINE# #UNINDENT# assert ( vnc . exitstatus == cmd ) , vnc . exitstatus