[pypy-svn] r62045 - pypy/trunk/pypy/tool
afa at codespeak.net
afa at codespeak.net
Fri Feb 20 11:32:04 CET 2009
Author: afa
Date: Fri Feb 20 11:32:02 2009
New Revision: 62045
Modified:
pypy/trunk/pypy/tool/watchdog_nt.py
Log:
Do not require the pywin32 module to be installed.
It's much more likely that we have a working ctypes...
Modified: pypy/trunk/pypy/tool/watchdog_nt.py
==============================================================================
--- pypy/trunk/pypy/tool/watchdog_nt.py (original)
+++ pypy/trunk/pypy/tool/watchdog_nt.py Fri Feb 20 11:32:02 2009
@@ -1,6 +1,6 @@
import sys, os
import threading
-import win32api, pywintypes
+import ctypes
PROCESS_TERMINATE = 0x1
@@ -11,10 +11,7 @@
global timedout
timedout = True
sys.stderr.write("="*26 + "timedout" + "="*26 + "\n")
- try:
- win32api.TerminateProcess(pid, 1)
- except pywintypes.error:
- pass
+ ctypes.windll.kernel32.TerminateProcess(pid, 1)
pid = os.spawnv(os.P_NOWAIT, sys.argv[2], sys.argv[2:])
More information about the Pypy-commit
mailing list