codekingpro/portable-devtools
115k
1# A Python file that can be used to start Pythonwin, instead of using2# pythonwin.exe3import os4import sys5 6import win32ui7 8import pywin.framework.intpyapp # InteractivePythonApp()9 10assert pywin.framework.intpyapp # not unused11# Pretend this script doesn't exist, or pythonwin tries to edit it12sys.argv[:] = sys.argv[1:] or [""] # like PySys_SetArgv(Ex)13if sys.path[0] not in ("", ".", os.getcwd()):14 sys.path.insert(0, os.getcwd())15# And bootstrap the app.16app = win32ui.GetApp()17if not app.InitInstance():18 # Run when not already handled by DDE19 app.Run()20 