當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。