孤独的猫

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

>>> import win32process
>>> win32process.CreateProcess('c:\\windows\\notepad.exe','',None,None,0,win32process.CREATE_NO_WINDOW,None,None,win32process.STARTUPINFO())
(<PyHANDLE:736>, <PyHANDLE:884>, 2944, 3260)
>>> handle=win32process.CreateProcess('c:\\windows\\notepad.exe','',None,None,0,win32process.CREATE_NO_WINDOW,None,None,win32process.STARTUPINFO())
>>> win32process.TerminateProcess(handle[0],0)
>>> import win32event
>>> handle=win32process.CreateProcess('c:\\windows\\notepad.exe','',None,None,0,win32process.CREATE_NO_WINDOW,None,None,win32process.STARTUPINFO());
>>> win32event.WaitForSingleObject(handle[0],-1)
0
>>>

posted on 2011-05-03 12:56  孤独的猫  阅读(900)  评论(0编辑  收藏  举报