本文整理汇总了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
示例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 {}
示例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')
示例4: getEnvironment
def getEnvironment( config = {} ):
import sys
import os.path
import PACKAGE
PACKAGE.standardSetup()
print 'GangaCMS> getEnvironment : done'
return
示例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' }
示例6: getEnvironment
def getEnvironment(c):
import PACKAGE
PACKAGE.standardSetup()
return {}
示例7: getEnvironment
def getEnvironment( config = {} ):
import PACKAGE
PACKAGE.standardSetup()