當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。