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 ...

Get Python Programming On Win32 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.