Starting a Python COM server from vb?
Robert M. Emmons
RobMEmmons at cs.com
Wed Apr 14 22:16:21 EDT 2004
> How do I ensure that the service is registered? Does this need to
> happen after every bootup?
I recommend highly the book: Python Programming on Win32 by Mark
Hammond and Andy Robinson ISBN: 1-56592-621-8. This should anwser many
of your questions regarding Python and windows. They talk both about
COM/ACTIVEX and about windows Servicies.
The short answer to your question--I think it really depends on what you
want. If you really want to run a "Service" in the windows sense, then
yes you probably have to launch this at boot time. Generally Servicies
or Daemons are just programs that run in the background. There is a way
to run these at startup on windows. I can't remember exactly how -- I'm
thinking there is a "Servicies" control panel(???)
On the other hand if your talking about COM/ActiveX Servers that is a
totally different thing. These are not Servicies. There is a standard
way of writing these in Python using the win-32all package -- i.e. the
python windows extnesions. It is to complicated for me to explain
directly here...though it is not difficult. You need the book or
another reference in front of you. Basically to setup a server you have
to add some special attributes to the classes that you want to register,
then some code that does the registration. The registration is
peristant. You put your program in some fixed location and then
register it once and it's good always. I've done this to write nice
little utilities to call from VBA in Excel. Works nice.
The book I referenced by the way covers both COM/ActiveX and Servicies
to regarless of your interest it should have some information.
Rob
More information about the Python-list
mailing list