本文整理汇总了Python中debug.Debuggable.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Debuggable.__init__方法的具体用法?Python Debuggable.__init__怎么用?Python Debuggable.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类debug.Debuggable
的用法示例。
在下文中一共展示了Debuggable.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from debug import Debuggable [as 别名]
# 或者: from debug.Debuggable import __init__ [as 别名]
def __init__(self, global_variables):
self.gv = global_variables
self.debug = self.gv.debug
self.size_cutoff = int(self.gv.settings.get_setting('minimum-heading-size', self))
self.max_headings = int(self.gv.settings.get_setting('maximum-headings', self))
self.root = 0
self.tree = None
Debuggable.__init__(self, 'Size Classifier')
示例2: __init__
# 需要导入模块: from debug import Debuggable [as 别名]
# 或者: from debug.Debuggable import __init__ [as 别名]
def __init__(self, global_variables):
self.gv = global_variables
self.debug = self.gv.debug
self.size_cutoff = 16
self.max_headings = 40
self.aggression_threshold = 8
self.root = 0
Debuggable.__init__(self, 'Size Classifier')
示例3: __init__
# 需要导入模块: from debug import Debuggable [as 别名]
# 或者: from debug.Debuggable import __init__ [as 别名]
def __init__(self, gv):
self.gv = gv
self.debug = self.gv.debug
self.zotero_items = []
self.mendeley_items = []
self.other_items = []
self.zotero_handler = ZoteroHandler(self.gv)
self.mendeley_handler = MendeleyHandler(self.gv)
self.other_handler = OtherHandler(self.gv)
Debuggable.__init__(self, 'Bibliography Handler')
示例4: __init__
# 需要导入模块: from debug import Debuggable [as 别名]
# 或者: from debug.Debuggable import __init__ [as 别名]
def __init__(self):
self.args = self.read_command_line()
self.debug = Debug()
self.gv = GV()
Debuggable.__init__(self, 'Main')
if self.args.get('--debug'):
self.debug.enable_debug()
self.dr = self.args.get('<path>')
self.f = self.args.get('<input_file>')
self.tr = etree.parse(os.path.join(self.dr, self.f))
示例5: __init__
# 需要导入模块: from debug import Debuggable [as 别名]
# 或者: from debug.Debuggable import __init__ [as 别名]
def __init__(self, global_variables, paragraph, replace_text, tree, manipulate, link_text='TO_LINK',
length_ignore=False):
self.paragraph = paragraph
self.replace_text = replace_text
self.gv = global_variables
self.debug = self.gv.debug
self.tree = tree
self.manipulate = manipulate
self.link_text = link_text
self.length_ignore = length_ignore
Debuggable.__init__(self, 'Reference Stub Linker Object')
示例6: __init__
# 需要导入模块: from debug import Debuggable [as 别名]
# 或者: from debug.Debuggable import __init__ [as 别名]
def __init__(self):
self.args = self.read_command_line()
self.debug = Debug()
self.gv = GV()
Debuggable.__init__(self, 'Main')
if self.args.get('--debug'):
self.debug.enable_debug()
self.dr = self.args.get('<path>')
self.f = self.args.get('<input_file>')
self.out_type = self.args.get('--out-type').lower()
self.script_path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
示例7: __init__
# 需要导入模块: from debug import Debuggable [as 别名]
# 或者: from debug.Debuggable import __init__ [as 别名]
def __init__(self):
self.args = self.read_command_line()
self.debug = Debug()
self.gv = GV()
Debuggable.__init__(self, 'Main')
if self.args.get('--debug'):
self.debug.enable_debug()
self.current_result = datetime.datetime.now().strftime(
"%Y_%m_%d-%H-%M-") + str(uuid.uuid4())[:8]
self.config = self.gv.read_json(self.args['<config_file>'])
self.all_typesetters = self.config.get('typesetters')
示例8: __init__
# 需要导入模块: from debug import Debuggable [as 别名]
# 或者: from debug.Debuggable import __init__ [as 别名]
def __init__(self, debug):
self.debug = debug
Debuggable.__init__(self, 'Interactive Prompt Handler')
# ANSI terminal colorization code heavily inspired by pygments:
# http://dev.pocoo.org/hg/pygments-main/file/b2deea5b5030/pygments/console.py
# (pygments is by Tim Hatch, Armin Ronacher, et al.)
self.COLOR_ESCAPE = "\x1b["
self.DARK_COLORS = ["black", "darkred", "darkgreen", "brown", "darkblue",
"purple", "teal", "lightgray"]
self.LIGHT_COLORS = ["darkgray", "red", "green", "yellow", "blue",
"fuchsia", "turquoise", "white"]
self.RESET_COLOR = self.COLOR_ESCAPE + "39;49;00m"
示例9: __init__
# 需要导入模块: from debug import Debuggable [as 别名]
# 或者: from debug.Debuggable import __init__ [as 别名]
def __init__(self):
self.args = self.read_command_line()
self.debug = Debug()
self.gv = GV()
self.uid = self.gv.uuid
self.dr = self.args.get("<path>")
self.f = self.args.get("<input_file>")
self.scheme = self.args.get("<scheme>")
self.set_numbering_tags = self.args.get("--set-numbering-tags")
self.tr = etree.parse(os.path.join(self.dr, self.f))
Debuggable.__init__(self, "Main")
if self.args.get("--debug"):
self.debug.enable_debug()
示例10: __init__
# 需要导入模块: from debug import Debuggable [as 别名]
# 或者: from debug.Debuggable import __init__ [as 别名]
def __init__(self, text, debug, stopwords=None, nostem=None):
"""
Store the raw text, tokenize.
Args:
text (str): The raw text string.
stopwords (str): A custom stopwords list path.
"""
self.debug = debug
Debuggable.__init__(self, 'TextPlot')
self.text = text
self.load_stopwords(stopwords)
self.load_nostem(nostem)
self.tokenize()
示例11: __init__
# 需要导入模块: from debug import Debuggable [as 别名]
# 或者: from debug.Debuggable import __init__ [as 别名]
def __init__(self):
# read command line arguments
self.args = self.read_command_line()
# absolute first priority is to initialize debugger so that anything triggered here can be logged
self.debug = Debug()
Debuggable.__init__(self, 'cassius-import')
self.in_file = self.args['<in-file>']
self.out_file = self.args['<out-file>']
self.dir = os.path.dirname(os.path.abspath(__file__))
if self.args['--debug']:
self.debug.enable_debug()
self.debug.enable_prompt(Interactive(self.args['--debug']))
示例12: __init__
# 需要导入模块: from debug import Debuggable [as 别名]
# 或者: from debug.Debuggable import __init__ [as 别名]
def __init__(self):
# read command line arguments
self.args = docopt(__doc__, version='meTypeset 0.1')
# absolute first priority is to initialize debugger so that anything triggered here can be logged
self.debug = Debug()
if self.args['--debug']:
self.debug.enable_debug()
# read settings file
self.settings_file_path = 'default'
self.tei_file_path = None
self.setup_settings_file()
self.settings = SettingsConfiguration(self.get_settings_file(), self.args)
self.gv = GV(self.settings, self.debug)
self.debug = self.gv.debug
Debuggable.__init__(self, 'Main')
示例13: __init__
# 需要导入模块: from debug import Debuggable [as 别名]
# 或者: from debug.Debuggable import __init__ [as 别名]
def __init__(self):
# read command line arguments
self.args = self.read_command_line()
# absolute first priority is to initialize debugger so that anything triggered here can be logged
self.debug = Debug()
Debuggable.__init__(self, 'plotsummary')
self.in_dir = self.args['<directory>']
self.term_file = self.args['<term_file>']
self.terms = [line.strip().lower() for line in open(self.term_file)]
self.dir = os.path.dirname(os.path.abspath(__file__))
if self.args['--debug']:
self.debug.enable_debug()
self.debug.enable_prompt(Interactive(self.args['--debug']))
if self.args['--caption']:
self.caption = self.args['--caption']
else:
self.caption = 'Term Plot'
if self.args['--nostem']:
self.nostem = self.args['--nostem']
else:
self.nostem = None
if self.args['single']:
self.action = 'single'
elif self.args['group']:
self.second_term_file = self.args['<second_term_file>']
self.term_name = self.args['<term_name>']
self.second_term_name = self.args['<second_term_name>']
self.second_terms = [line.strip().lower() for line in open(self.second_term_file)]
self.action = 'group'
elif self.args['hist']:
self.action = 'hist'
elif self.args['rawcount']:
self.action = 'rawcount'
示例14: __init__
# 需要导入模块: from debug import Debuggable [as 别名]
# 或者: from debug.Debuggable import __init__ [as 别名]
def __init__(self):
# read command line arguments
self.args = self.read_command_line()
# absolute first priority is to initialize debugger so that anything triggered here can be logged
self.debug = Debug()
Debuggable.__init__(self, 'Main')
if self.args['--debug']:
self.debug.enable_debug(self.args['--nogit'])
# read settings file
self.settings_file_path = 'default'
self.tei_file_path = None
self.settings_file_path = Settings.setup_settings_file(self.args)
self.settings = Settings(Settings.get_settings_file(self, self.settings_file_path), self.args)
self.gv = GV(self.settings, self.debug)
self.debug.enable_prompt(Interactive(self.gv))
示例15: __init__
# 需要导入模块: from debug import Debuggable [as 别名]
# 或者: from debug.Debuggable import __init__ [as 别名]
def __init__(self):
# read command line arguments
self.args = self.read_command_line()
# absolute first priority is to initialize debugger so that anything triggered here can be logged
self.debug = Debug()
Debuggable.__init__(self, 'CWF')
self.corpus = self.args['<corpus_directory>']
self.words = self.args['<word_list>'].split(",")
self.output = self.args['<output_csv>']
self.terms = {}
self.years = []
self.year_count = {}
if self.args['--debug']:
self.debug.enable_debug()
self.debug.enable_prompt(Interactive(self.args['--debug']))