#NEWLINE# def open( self , cmd , lines , columns , python_exe = 'python.exe' , communicator_py = 'conque_sole_communicator.py' , options = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) : #NEWLINE# #INDENT# ' Launch python.exe subprocess which will in turn launch the user\'s program.\n\n        Arguments:\n        cmd -- The user\'s command to run. E.g. "Powershell.exe" or "C:\\Python27\\Scripts\\ipython.bat"\n        lines, columns -- The size of the console, also the size of the Vim buffer\n        python.exe -- The path to the python executable, typically C:\\PythonXX\\python.exe\n        communicator_py -- The path to the subprocess controller script in the user\'s vimfiles directory\n        options -- optional configuration\n\n        ' #NEWLINE# self . lines = lines #NEWLINE# self . columns = columns #NEWLINE# self . bucket = u ( '' ) #NEWLINE# self . shm_key = ( 'mk' + str ( time . time ( ) ) ) #NEWLINE# cmd_line = ( '%s "%s" %s %d %d %d %d %s' % ( python_exe , communicator_py , self . shm_key , int ( self . columns ) , int ( self . lines ) , int ( options [ 'CODE_PAGE' ] ) , int ( CONQUE_FAST_MODE ) , cmd ) ) #NEWLINE# flags = ( ( NORMAL_PRIORITY_CLASS | DETACHED_PROCESS ) | CREATE_UNICODE_ENVIRONMENT ) #NEWLINE# si = STARTUPINFO ( ) #NEWLINE# pi = PROCESS_INFORMATION ( ) #NEWLINE# try : #NEWLINE# #INDENT# res = ctypes . windll . kernel32 . CreateProcessW ( None , u ( cmd_line ) , None , None , 0 , flags , None , u ( '.' ) , ctypes . byref ( si ) , ctypes . byref ( pi ) ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# raise #NEWLINE# #UNINDENT# self . pid = pi . dwProcessId #NEWLINE# self . init_shared_memory ( self . shm_key )