#NEWLINE# def __spawn( self ) : #NEWLINE# #INDENT# ( master , slave ) = pty . openpty ( ) #NEWLINE# devnul = open ( os . devnull , 'r' ) #NEWLINE# cmd = ( ( self . cmd + ( '-nb::{}' . format ( self . port ) , ) ) + self . vimrc ) #NEWLINE# self . proc = subprocess . Popen ( cmd , stdin = slave , stdout = slave , stderr = devnul , close_fds = True ) #NEWLINE# self . output = os . fdopen ( devnul , 'rb' ) #NEWLINE# self . input = os . fdopen ( master , 'wb' ) #NEWLINE# def pump( ) : #NEWLINE# #INDENT# self . tty = v = VT100 ( self . cols , self . rows , callback = self . _update ) #NEWLINE# while True : #NEWLINE# #INDENT# b = self . output . read ( 1 ) #NEWLINE# if ( not b ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# v . append ( b ) #NEWLINE# #UNINDENT# #UNINDENT# threading . Thread ( target = pump ) . start ( )