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

Blair

_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/ActivePython

Reply via email to