当前位置: 首页>>代码示例>>Python>>正文


Python debug.Debuggable类代码示例

本文整理汇总了Python中debug.Debuggable的典型用法代码示例。如果您正苦于以下问题:Python Debuggable类的具体用法?Python Debuggable怎么用?Python Debuggable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Debuggable类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

 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')
开发者ID:MartinPaulEve,项目名称:meTypeset,代码行数:8,代码来源:sizeclassifier.py

示例2: __init__

 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')
开发者ID:jure,项目名称:meTypeset,代码行数:8,代码来源:sizeclassifier.py

示例3: __init__

 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')
开发者ID:jure,项目名称:meTypeset,代码行数:10,代码来源:bibliographyaddins.py

示例4: __init__

 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))
开发者ID:withanage,项目名称:mpt,代码行数:10,代码来源:prepare.py

示例5: __init__

 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')
开发者ID:anukat2015,项目名称:meTypeset,代码行数:11,代码来源:referencelinker.py

示例6: __init__

 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())))
开发者ID:withanage,项目名称:mpt,代码行数:11,代码来源:disseminate.py

示例7: __init__

    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')
开发者ID:withanage,项目名称:mpt,代码行数:13,代码来源:mpt.py

示例8: __init__

    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"
开发者ID:MartinPaulEve,项目名称:ChronicWordFreq,代码行数:13,代码来源:interactive.py

示例9: __init__

    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()
开发者ID:withanage,项目名称:mpt,代码行数:15,代码来源:merge.py

示例10: __init__

    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()
开发者ID:MartinPaulEve,项目名称:PlotSummary,代码行数:17,代码来源:text.py

示例11: __init__

    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']))
开发者ID:MartinPaulEve,项目名称:CaSSius,代码行数:18,代码来源:cassius-import.py

示例12: __init__

    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')
开发者ID:jure,项目名称:meTypeset,代码行数:18,代码来源:meTypeset.py

示例13: __init__

    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'
开发者ID:kmelve,项目名称:PlotSummary,代码行数:43,代码来源:plotsummary.py

示例14: __init__

    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))
开发者ID:jstirnaman,项目名称:meTypeset,代码行数:20,代码来源:meTypeset.py

示例15: __init__

    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']))
开发者ID:MartinPaulEve,项目名称:ChronicWordFreq,代码行数:20,代码来源:chronicWordFreq.py


注:本文中的debug.Debuggable类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。