[python-win32] COM registration hangs up: 32 bit Python 3.7 on 64 bit Win 7
Boylan, Ross
Ross.Boylan at ucsf.edu
Tue Dec 4 16:48:42 EST 2018
Sorry: previous message went out before complete.
Terminal:
Z:\FahyGroup\Ross Boylan\Wk devel>py BSTImport.py --debug
aatmpt_bst
In main. Attempting to register.
Args = ['BSTImport.py', '--debug']
And then it just sits there. ^C at the terminal does not interrupt it, though I can kill the python process. Searching in the registry does not indicate any of the keys associated with my class.
How do I solve this, or at least debug it?
The main application is in 32 bit Access 2010, although the system is 64 bit Win 7. When I discovered I couldn't open the relevant libraries (esp DAO) from 64 bit python 3.6 I installed 32 bit python 3.7. I can use it as a client application, but wanted to make it a server.
BSTImport.py includes
import pdb, traceback
import atexit, csv, sys
import pythoncom, win32com.client
from win32com.server.exception import COMException
from win32com.client import constants
from win32com.server.register import UseCommandLine
TmpTable = "aatmpt_bst" # table to import csv into
print(TmpTable)
class BSTImport:
# COM Support
_public_methods_ = ['Fred']
_reg_clsid_ = "{050321C2-9B99-4444-B5E9-B636DFD94C4D}"
_reg_desc_ = "BST Test Com Server in Python 32 bit"
_reg_progid_ = "Fahy.BST"
def Fred(self, name, obj):
return "Hey {}; I'm Fred. I mess with {}.".format(name, TmpTable)
# other stuff only relevant as a client
if __name__ == "__main__":
print("In main. Attempting to register.\nArgs = {}".format(sys.argv))
UseCommandLine(BSTImport)
print("I think I'm done.")
More information about the python-win32
mailing list