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


Python PACKAGE.standardSetup方法代码示例

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


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

示例1: getEnvironment

# 需要导入模块: import PACKAGE [as 别名]
# 或者: from PACKAGE import standardSetup [as 别名]
def getEnvironment(config=None):
    import sys
    import os.path
    import PACKAGE

    PACKAGE.standardSetup()
    return
开发者ID:milliams,项目名称:ganga,代码行数:9,代码来源:__init__.py

示例2: getEnvironment

# 需要导入模块: import PACKAGE [as 别名]
# 或者: from PACKAGE import standardSetup [as 别名]
def getEnvironment(config={}):
    import sys
    import os.path
    import PACKAGE

    PACKAGE.standardSetup()

    arch = platform.machine()
    if not arch == "x86_64":
        logger.error("GangaCMS> %s not supported. Different than 64 bits." % (arch))
        return
    logger.info("GangaCMS> not supported different OS than SLC5")

    config = Ganga.Utility.Config.getConfig("CMSSW")
    cmssw_version = config["CMSSW_VERSION"]
    cmssw_setup = config["CMSSW_SETUP"]
    crab_version = config["CRAB_VERSION"]
    cmssw_setup_script = os.path.join(cmssw_setup, "CMSSW_generic.sh")
    if not os.path.exists(cmssw_setup_script):
        logger.error('GangaCMS> CMSSW setup script not found: "%s"' % (cmssw_setup_script))
        return

    location = config["location"]

    cmsswhome = os.path.join(location, cmssw_version)
    if not os.path.exists(cmsswhome):
        logger.error('GangaCMS> CMSSW location not found: "%s"' % (cmsswhome))
        return

    #    from Ganga.Utility.Shell import Shell
    #    shell = Shell(cmssw_setup_script)

    logger.info("GangaCMS> [INFO] getEnvironment : done")
    #    return shell.env
    return {}
开发者ID:chrisburr,项目名称:ganga,代码行数:37,代码来源:__init__.py

示例3: standardSetup

# 需要导入模块: import PACKAGE [as 别名]
# 或者: from PACKAGE import standardSetup [as 别名]
def standardSetup():

    import os.path
    import PACKAGE

    PACKAGE.standardSetup()

    arch = platform.machine()
    if not arch == 'x86_64':
        logger.error('GangaCMS> %s not supported. Different than 64 bits.'%(arch))
        return
    logger.info('GangaCMS> not supported different OS than SLC5')

    config = Ganga.Utility.Config.getConfig('CMSSW')
    cmssw_version = config['CMSSW_VERSION']
    cmssw_setup = config['CMSSW_SETUP']
    crab_version = config['CRAB_VERSION']
    cmssw_setup_script = os.path.join(cmssw_setup,'CMSSW_generic.sh')
    if not os.path.exists(cmssw_setup_script):
        logger.error('GangaCMS> CMSSW setup script not found: "%s"'%(cmssw_setup_script))
        return

    location = config['location']

    cmsswhome = os.path.join(location,cmssw_version)
    if not os.path.exists(cmsswhome):
        logger.error('GangaCMS> CMSSW location not found: "%s"'%(cmsswhome))
        return

#    from Ganga.Utility.Shell import Shell
#    shell = Shell(cmssw_setup_script)   

    logger.info('GangaCMS> [INFO] getEnvironment : done')
开发者ID:Erni1619,项目名称:ganga,代码行数:35,代码来源:__init__.py

示例4: getEnvironment

# 需要导入模块: import PACKAGE [as 别名]
# 或者: from PACKAGE import standardSetup [as 别名]
def getEnvironment( config = {} ):
    import sys
    import os.path
    import PACKAGE
   
    PACKAGE.standardSetup()
    print 'GangaCMS> getEnvironment : done'
    return 
开发者ID:andres0sorio,项目名称:CMSWork,代码行数:10,代码来源:__init__.py

示例5: getEnvironment

# 需要导入模块: import PACKAGE [as 别名]
# 或者: from PACKAGE import standardSetup [as 别名]
def getEnvironment(c):
    import PACKAGE
    PACKAGE.standardSetup()
    
    #   set up X509_CERT_DIR for DQ2
    from Ganga.Utility.GridShell import getShell
    gshell = getShell()
    if gshell:
       try:
          return { 'X509_CERT_DIR' : gshell.env['X509_CERT_DIR'], 'X509_USER_PROXY' : gshell.env['X509_USER_PROXY']  }
       except KeyError:
          return { 'X509_CERT_DIR' : '/etc/grid-security/certificates' }
开发者ID:kreczko,项目名称:ganga,代码行数:14,代码来源:__init__.py

示例6: getEnvironment

# 需要导入模块: import PACKAGE [as 别名]
# 或者: from PACKAGE import standardSetup [as 别名]
def getEnvironment(c):
    import PACKAGE
    PACKAGE.standardSetup()
    return {}
开发者ID:Erni1619,项目名称:ganga,代码行数:6,代码来源:BOOT.py

示例7: getEnvironment

# 需要导入模块: import PACKAGE [as 别名]
# 或者: from PACKAGE import standardSetup [as 别名]
def getEnvironment( config = {} ):
    import PACKAGE
    PACKAGE.standardSetup()
开发者ID:wvengen,项目名称:lgipilot,代码行数:5,代码来源:__init__.py


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