O'Reilly logo

Python Programming On Win32 by Mark Hammond, Andy Robinson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Configure DCOM on the Remote Machine

The first step is to configure DCOM on the remote machine, where the object will actually run.

To configure DCOM, start the DCOM configuration tool by selecting the Run option from the Windows start menu, and enter dcomcnfg. The mail display is shown in Figure 12.4.

The DCOM configuration tool
Figure 12.4. The DCOM configuration tool

Now select the Default Properties tab and ensure that DCOM is enabled for this computer, as shown in Figure 12.5.

DCOM configuration tool with DCOM enabled
Figure 12.5. DCOM configuration tool with DCOM enabled

No additional configuration options are required on the remote machine, but you do need to ensure the COM object itself is installed on this computer. There’s nothing special about registering your object for DCOM; perform a normal registration process for the object, as described in the previous section Registering Your COM Server.

The Python.Interpreter object you use is part of the standard Python COM distribution, so it should have been registered when the Python COM extensions were installed. However, it can’t hurt to reregister it. To register the Python.Interpreter object, perform the following steps on the remote machine:

  1. Start PythonWin.

  2. Select File Run, select the Browse button, and locate the file win32com\servers\interp.py.

  3. Select OK.

The PythonWin window should report:

Registering ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required