当前位置: 首页>>代码示例>>Python>>正文


Python client.CreateObject方法代码示例

本文整理汇总了Python中comtypes.client.CreateObject方法的典型用法代码示例。如果您正苦于以下问题:Python client.CreateObject方法的具体用法?Python client.CreateObject怎么用?Python client.CreateObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在comtypes.client的用法示例。


在下文中一共展示了client.CreateObject方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: create_com_object

# 需要导入模块: from comtypes import client [as 别名]
# 或者: from comtypes.client import CreateObject [as 别名]
def create_com_object():
        try:
            log.debug("Trying COM Name 'MSFileReader.XRawfile'")
            obj = CreateObject('MSFileReader.XRawfile')
        except Exception as e:
            log.debug(e)
            try:
                log.debug("Trying COM Name ('XRawfile.XRawfile'")
                obj = CreateObject('XRawfile.XRawfile')
            except Exception as e:
                log.debug(e)
                raise ImportError(
                    ('Please install the appropriate Thermo MSFileReader'
                     'version depending of your Python version (32 bit or 64 bit)\n%r') % e)
        return obj 
开发者ID:mobiusklein,项目名称:ms_deisotope,代码行数:17,代码来源:MSFileReader.py

示例2: create_com_object

# 需要导入模块: from comtypes import client [as 别名]
# 或者: from comtypes.client import CreateObject [as 别名]
def create_com_object():
        if not DLL_IS_LOADED:
            raise WindowsError("Could not locate Agilent DLLs")
        reader = CreateObject('Agilent.MassSpectrometry.DataAnalysis.MassSpecDataReader')
        return reader 
开发者ID:mobiusklein,项目名称:ms_deisotope,代码行数:7,代码来源:AgilentD.py

示例3: create_com_object_filter

# 需要导入模块: from comtypes import client [as 别名]
# 或者: from comtypes.client import CreateObject [as 别名]
def create_com_object_filter():
        if not DLL_IS_LOADED:
            raise WindowsError("Could not locate Agilent DLLs")
        no_filter = CreateObject('Agilent.MassSpectrometry.DataAnalysis.MsdrPeakFilter')
        return no_filter 
开发者ID:mobiusklein,项目名称:ms_deisotope,代码行数:7,代码来源:AgilentD.py

示例4: load_vds_service

# 需要导入模块: from comtypes import client [as 别名]
# 或者: from comtypes.client import CreateObject [as 别名]
def load_vds_service():
    loader = client.CreateObject(CLSID_VdsLoader, interface=IVdsServiceLoader)
    svc = loader.LoadService(None)
    svc.WaitForServiceReady()
    return svc 
开发者ID:cloudbase,项目名称:cloudbase-init,代码行数:7,代码来源:vds.py

示例5: instance_app

# 需要导入模块: from comtypes import client [as 别名]
# 或者: from comtypes.client import CreateObject [as 别名]
def instance_app(self, ps_id):
        naming_space = [self._root]
        if not self.object_name:
            naming_space.append(self._object_name)
        else:
            naming_space.append(self.object_name)
        naming_space.append(ps_id)
        self._program_name = self._assemble_program_name(naming_space)
        return CreateObject(self._program_name, dynamic=True) 
开发者ID:loonghao,项目名称:photoshop-python-api,代码行数:11,代码来源:_core.py

示例6: create_com_object

# 需要导入模块: from comtypes import client [as 别名]
# 或者: from comtypes.client import CreateObject [as 别名]
def create_com_object():
        try:
            log.debug("obj = CreateObject('MSFileReader.XRawfile')")
            obj = CreateObject('MSFileReader.XRawfile')
        except Exception as exc:
            log.debug(exc)
            try:
                log.debug("obj = CreateObject('XRawfile.XRawfile')")
                obj = CreateObject('XRawfile.XRawfile')
            except Exception as e:
                log.debug(e)
                raise ImportError(
                    ('Please install the appropriate Thermo MSFileReader'
                     'version depending of your Python version (32bits or 64bits)\n%r') % e)
        return obj 
开发者ID:frallain,项目名称:pymsfilereader,代码行数:17,代码来源:MSFileReader.py

示例7: start

# 需要导入模块: from comtypes import client [as 别名]
# 或者: from comtypes.client import CreateObject [as 别名]
def start(self):
        Rhino_tlb = GetModule("C:/Program Files/Rhinoceros 5/System/Rhino5.tlb")
        RhinoScript_tlb = GetModule("C:/Program Files/Rhinoceros 5/Plug-ins/RhinoScript.tlb")
        self.Rhino = CreateObject('Rhino5x64.Application').QueryInterface(Rhino_tlb.IRhino5x64Application)
        while not self.Rhino.IsInitialized():
            print('Initialising Rhino...')
            time.sleep(0.5)
        print('Rhino initialised!')
        self.rs = self.Rhino.GetScriptObject().QueryInterface(RhinoScript_tlb.IRhinoScript) 
开发者ID:compas-dev,项目名称:compas,代码行数:11,代码来源:client.py


注:本文中的comtypes.client.CreateObject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。