Did I find the right examples for you? yes no

All Samples(8)  |  Call(6)  |  Derive(0)  |  Import(2)

src/v/i/VistA-HEAD/Python/Pexpect/winpexpect.py   VistA(Download)
                      CloseHandle, GetCurrentThread, STD_INPUT_HANDLE)
from win32pipe import CreateNamedPipe, ConnectNamedPipe
from win32process import (STARTUPINFO, CreateProcess, CreateProcessAsUser,
			  GetExitCodeProcess, TerminateProcess, ExitProcess,
                          GetWindowThreadProcessId)
    input = _parse_header(header)
    if 'command' not in input or 'args' not in input:
        ExitProcess(2)
 
    # http://msdn.microsoft.com/en-us/library/ms682499(VS.85).aspx
        message = _quote_header(str(e))
        WriteFile(cmd_pipe, 'status=error\nmessage=%s\n\n' % message)
        ExitProcess(3)
    else:
        pid = res[2]
 
    # Pass back results and exit
    err, nbytes = WriteFile(cmd_pipe, 'status=ok\npid=%s\n\n' % pid)
    ExitProcess(0)

src/w/i/winpexpect-1.5/lib/winpexpect.py   winpexpect(Download)
                      CloseHandle, GetCurrentThread)
from win32pipe import CreateNamedPipe, ConnectNamedPipe
from win32process import (STARTUPINFO, CreateProcess, CreateProcessAsUser,
			  GetExitCodeProcess, TerminateProcess, ExitProcess)
from win32event import WaitForSingleObject, INFINITE
    input = _parse_header(header)
    if 'command' not in input or 'args' not in input:
        ExitProcess(2)
 
    # http://msdn.microsoft.com/en-us/library/ms682499(VS.85).aspx
        message = _quote_header(str(e))
        WriteFile(cmd_pipe, 'status=error\nmessage=%s\n\n' % message)
        ExitProcess(3)
    else:
        pid = res[2]
 
    # Pass back results and exit
    err, nbytes = WriteFile(cmd_pipe, 'status=ok\npid=%s\n\n' % pid)
    ExitProcess(0)