def DispatchEx(clsid, machine=None, userName=None, resultCLSID=None, typeinfo=None, UnicodeToString=None, clsctx=None):
 assert (UnicodeToString is None), 'this is deprecated and will go away'
 if (clsctx is None):
  clsctx = pythoncom.CLSCTX_SERVER
  if (machine is not None):
   clsctx = (clsctx & (~ pythoncom.CLSCTX_INPROC))
 if (machine is None):
  serverInfo = None
 else:
  serverInfo = (machine,)
 if (userName is None):
  userName = clsid
 dispatch = pythoncom.CoCreateInstanceEx(clsid, None, clsctx, serverInfo, (pythoncom.IID_IDispatch,))[0]
 return Dispatch(dispatch, userName, resultCLSID, typeinfo, clsctx=clsctx)

def DispatchEx ( clsid , machine = None , userName = None , resultCLSID = None , typeinfo = None , UnicodeToString = None , clsctx = None ) : assert ( UnicodeToString is None ) , 'this is deprecated and will go away' if ( clsctx is None ) : clsctx = pythoncom . CLSCTX_SERVER if ( machine is not None ) : clsctx = ( clsctx & ( ~ pythoncom . CLSCTX_INPROC ) ) if ( machine is None ) : serverInfo = None else : serverInfo = ( machine , ) if ( userName is None ) : userName = clsid dispatch = pythoncom . CoCreateInstanceEx ( clsid , None , clsctx , serverInfo , ( pythoncom . IID_IDispatch , ) ) [ 0 ] return Dispatch ( dispatch , userName , resultCLSID , typeinfo , clsctx = clsctx )
creates a dispatch based com object on a specific machine .