idZddlZddlZddlZddlZdZedkr9eej dkreej ddSe edSdS)atestDCOM.py - Simple DCOM test Usage: testDCOM.py serverName Attempts to start the Python.Interpreter object on the named machine, and checks that the object is indeed running remotely. Requires the named server be configured to run DCOM (using dcomcnfg.exe), and the Python.Interpreter object installed and registered on that machine. The Python.Interpreter object must be installed on the local machine, but no special DCOM configuration should be necessary. Nc,|tjkrtddStjtjz}tj d||}| d| d}||kr%td ||dStd|zdS)Nz=You must specify a remote server name, not the local machine!zPython.Interpreter)clsctxzimport win32apizwin32api.GetComputerName()zBError: The object created on server '{}' reported its name as '{}'z+Object created and tested OK on server '%s') lowerwin32apiGetComputerNameprint pythoncom CLSCTX_SERVERCLSCTX_INPROC_SERVERwin32comclient DispatchExExecEvalformat) serverNamerob actualNames DC:\PYTHON\_runtimes\venv\Lib\site-packages\win32com/test/testDCOM.pytestrs X577==???? MNNN  $ (F'F FF  # #$8*V # T TBGG 566JZ--//// P W WJ       ;jHIIIII__main__) usagesysr rwin32com.clientr r__name__lenargvrrrr"s  JJJ, z s38}} SXa[ e r