Python COM: Unable to create server-side object.
André
arisen at start.no
Thu Jun 21 14:35:51 EDT 2001
Hi. Something strange is happening to in my Python / COM
recently (ActiveState Python 2.0 on Win2K). I have created
this small class in the file short.py:
class Short:
_reg_clsid_ = "{74471ADF-9453-4135-87E6-22E1B9499B0D}"
_reg_progid_ = "Python.Short"
_reg_desc_ = "PythonCOM test"
_public_methods = ["isShort"]
def __init__(self):
self.short = "yes"
def isShort(self):
return self.short
if __name__=="__main__":
import win32com.server.register
win32com.server.register.UseCommandLine(Short)
And registered it succcessfully. ($ python short.py)
When i try
>>> import win32com.client
>>> s = win32com.client.Dispatch("Python.Short")
I get the following error:
(-2147221231, 'ClassFactory cannot supply requested class', None, None)
If i try it again i get another:
(-2147467259, 'Unspecified error', None, None)
I have tried with diffeetn class names, prog ids and clsids.
This used to work fine, and i have written several com servers
in python before which still work. Any ideas?
--
Regards
André Risnes
More information about the Python-list
mailing list