DCOM servers in Python... how?

Mark Hammond mhammond at skippinet.com.au
Thu Oct 21 17:25:56 EDT 1999


> Now I don't know that much about DCOM. I have been roaming through
the
> Pythonwin COM documentation and wonder if it all also holds true for
> DCOM. The only DCOM example program I saw was for a client
> though. What
> is the easiest way to implement a DCOM server then?

There is nothing special at all except, as Gordon mentioned, possible
security implications.  You should run "dcomcnfg.exe" on the server to
see what the default policy for the machine is - from memory, the
default is very open.

Basically, just register any Python COM object on the server.  Then,
from the client, use either:

* win32com.client.DispatchEx() and nominate the machine, or
* run dcomcnfg and configure the particular server.

Actually, there is one additional complication - if the Python object
is also installed locally as an inproc object (which by default there
will be), then this is used regardless of the dcom config for that
object.  From memory, if you use the DispatchEx route, it side-steps
this complication.

Mark.





More information about the Python-list mailing list