本文整理汇总了Python中Pyblio.Config.parse_directory方法的典型用法代码示例。如果您正苦于以下问题:Python Config.parse_directory方法的具体用法?Python Config.parse_directory怎么用?Python Config.parse_directory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pyblio.Config
的用法示例。
在下文中一共展示了Config.parse_directory方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUp
# 需要导入模块: from Pyblio import Config [as 别名]
# 或者: from Pyblio.Config import parse_directory [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 Pyblio import Config [as 别名]
# 或者: from Pyblio.Config import parse_directory [as 别名]
def setUp(self):
Config.parse_directory(os.path.join(basedir, '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 Pyblio import Config [as 别名]
# 或者: from Pyblio.Config import parse_directory [as 别名]
Autoload.preregister ('format', 'ISIFile', 'Pyblio.Format.isifile', '.*\.isi')
# define styles and outputs
Autoload.preregister ('style', 'Generic', 'Pyblio.Style.Generic')
Autoload.preregister ('style', 'apa4e', 'Pyblio.Style.apa4e')
Autoload.preregister ('style', 'abbrv', 'Pyblio.Style.abbrv')
Autoload.preregister ('output', 'Text', 'Pyblio.Output.text')
Autoload.preregister ('output', 'Raw', 'Pyblio.Output.raw')
Autoload.preregister ('output', 'HTML', 'Pyblio.Output.html')
Autoload.preregister ('output', 'LaTeX', 'Pyblio.Output.LaTeX')
Autoload.preregister ('output', 'Textnum', 'Pyblio.Output.textnum')
Autoload.preregister ('output', 'Textau', 'Pyblio.Output.textau')
# define key formats
Autoload.preregister ('key', 'Default', 'Pyblio.Utils')
# Parse the configuration directory
rootconfig = os.path.join ('Pyblio', 'ConfDir')
if not os.path.isdir (rootconfig):
rootconfig = os.path.join (version.pybdir, 'Pyblio', 'ConfDir')
if os.path.isdir (rootconfig):
Config.parse_directory (rootconfig)
示例4: setUp
# 需要导入模块: from Pyblio import Config [as 别名]
# 或者: from Pyblio.Config import parse_directory [as 别名]
def setUp(self):
Config.parse_directory(os.path.join(basedir, 'ConfDir'))
Config.load_user()
self.db = Base.DataBase('//localhost/Internal')
self.output = cStringIO.StringIO()
示例5:
# 需要导入模块: from Pyblio import Config [as 别名]
# 或者: from Pyblio.Config import parse_directory [as 别名]
# -*- coding: iso8859-1 -*-
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 Pyblio import Base, Config, Fields
Config.parse_directory (os.path.abspath('../ConfDir'))
Config.load_user ()
from Pyblio.Format import Medline
example_1 = """PMID- 15985842
OWN - NLM
STAT- MEDLINE
DA - 20050629
DCOM- 20050805
PUBM- Print
IS - 0022-3018
VI - 193