本文整理汇总了Python中Legacy.Config.load_user方法的典型用法代码示例。如果您正苦于以下问题:Python Config.load_user方法的具体用法?Python Config.load_user怎么用?Python Config.load_user使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Legacy.Config
的用法示例。
在下文中一共展示了Config.load_user方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
# 需要导入模块: from Legacy import Config [as 别名]
# 或者: from Legacy.Config import load_user [as 别名]
def setUp(self):
Config.parse_directory(os.path.abspath("../ConfDir"))
Config.load_user()
self.db = DataBase("//localhost/Internal")
self.output = cStringIO.StringIO()
self.mapping = Config.get("ovid/mapping").data
示例2: setUp
# 需要导入模块: from Legacy import Config [as 别名]
# 或者: from Legacy.Config import load_user [as 别名]
def setUp (self):
Config.parse_directory (os.path.abspath('../ConfDir'))
Config.load_user ()
print 'CONFIGURATION'
print 50*'-'
for i in Config.domains ():
print i, Config.keys_in_domain (i)
print 'END', 50*'-'
self.db = Base.DataBase ('//localhost/Internal')
self.output = cStringIO.StringIO()
示例3:
# 需要导入模块: from Legacy import Config [as 别名]
# 或者: from Legacy.Config import load_user [as 别名]
import cStringIO, os, sys, unittest
import locale
locale.setlocale (locale.LC_ALL, '')
import gettext
gettext.install ('pybliographer', '/usr/local/share/locale', unicode = True)
sys.path.append (os.path.abspath('../..'))
from Legacy import Base, Config, Fields
Config.parse_directory (os.path.abspath('../ConfDir'))
Config.load_user ()
from Legacy.Format import Medline
example_1 = """PMID- 15985842
OWN - NLM
STAT- MEDLINE
DA - 20050629
DCOM- 20050805
PUBM- Print
IS - 0022-3018
VI - 193
IP - 7