[python-win32] (no subject)

spencer at efn.org spencer at efn.org
Fri Feb 6 16:58:33 EST 2004


Here's an old question that must have been answered by private email, because I 
can't find the answer anywhere. I literally copied/pasted this, because it's 
exactly my question. It's about the example on page 69 of "Python Programming 
on Win32":

I was trying to get the second part of the example from Chapter 5 of
"Python programming on win32" to work.

It is a simple COM server. The code is:

class PythonUtilities:
     _public_methods_ = [ 'SplitString' ]
     _reg_progid_ = "PythonDemos.Utilities"
     _reg_clsid_ = "{41B329A0-14D2-498B-9F49-55B7203BE0E7}"

     def SplitString(self, val, item=None):
         import string
         if item != None : item = str(item)
         return string.split(str(val),item)

if __name__ == '__main__':
     print "Registering COM"
     import win32com.server.register
     win32com.server.register.UseCommandLine(PythonUtilities)

The class id was obtained by doing
>>> print pythoncom.CreateGuid()

Now when I execute this I get the following message

>>> Registering COM
Warning:  Can not locate a host .EXE for the COM server
The server will not be registered with LocalServer32 support.Registered:
PythonDemos.Utilities

Can anyone explain what might have gone wrong?

Thanks
Spencer Doidge

 
 





More information about the Python-win32 mailing list