"The application failed to initialize properly ... Click on OK,to terminate the application." is the message from the error pop-up. What is the way to catch these errors in Python code?
views:
238answers:
1
+1
A:
Sounds familiar? This will block your subprocess.Popen
forever.. until you click the 'OK' button. Add the following code to your module initialization to workaround this issue:
import win32api, win32con
win32api.SetErrorMode(win32con.SEM_FAILCRITICALERRORS |
win32con.SEM_NOOPENFILEERRORBOX)
Sridhar Ratnakumar
2009-06-12 05:35:13