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


Python PACKAGE类代码示例

本文整理汇总了Python中PACKAGE的典型用法代码示例。如果您正苦于以下问题:Python PACKAGE类的具体用法?Python PACKAGE怎么用?Python PACKAGE使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: getEnvironment

def getEnvironment(config=None):
    import sys
    import os.path
    import PACKAGE

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

示例2: getEnvironment

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,代码行数:35,代码来源:__init__.py

示例3: standardSetup

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,代码行数:33,代码来源:__init__.py

示例4: getEnvironment

def getEnvironment( config = {} ):
    import sys
    import os.path
    import PACKAGE
   
    PACKAGE.standardSetup()
    print 'GangaCMS> getEnvironment : done'
    return 
开发者ID:andres0sorio,项目名称:CMSWork,代码行数:8,代码来源:__init__.py

示例5: getEnvironment

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,代码行数:12,代码来源:__init__.py

示例6: getEnvironment

def getEnvironment(c):
    import PACKAGE
    PACKAGE.standardSetup()
    return {}
开发者ID:Erni1619,项目名称:ganga,代码行数:4,代码来源:BOOT.py

示例7: getEnvironment

def getEnvironment( config = {} ):
    import PACKAGE
    PACKAGE.standardSetup()
开发者ID:wvengen,项目名称:lgipilot,代码行数:3,代码来源:__init__.py


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