Added some code for starting

This commit is contained in:
2016-02-13 17:06:36 -06:00
parent 364472da5c
commit 0266100d66
110 changed files with 6044 additions and 0 deletions

21
src/libloader/com.py Normal file
View File

@@ -0,0 +1,21 @@
from pywintypes import com_error
from win32com.client import gencache
def prepare_gencache():
gencache.is_readonly = False
gencache.GetGeneratePath()
def load_com(*names):
result = None
for name in names:
try:
result = gencache.EnsureDispatch(name)
break
except com_error:
continue
if result is None:
raise com_error("Unable to load any of the provided com objects.")
return result