2009-06-10 親プロセスが死んでる場合に対応 from ctypes import * from ctypes.wintypes import * import win32process class PROCESSENTRY32(Structure): _fields_ = ( ('dwSize', DWORD, ), ('cntUsage', DWORD, ), ('th32ProcessID', DWORD, ), ('th32DefaultHeapID', POINTER(ULONG), ), ('th32ModuleID', DWORD, ), ('cntThreads', DWORD, ), ('th32ParentProcessID', DWORD, ), ('pcPriClassBase', LONG, ), ('dwFlags', DWORD, ), ('szExe