本文整理汇总了Python中misura.canon.logger.get_module_logging函数的典型用法代码示例。如果您正苦于以下问题:Python get_module_logging函数的具体用法?Python get_module_logging怎么用?Python get_module_logging使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_module_logging函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_module_logging
# System library imports.
from PyQt4 import QtGui
from pygments import formatters, lexer, lexers, styles
from .. import _
from misura.canon.logger import get_module_logging
logging = get_module_logging(__name__)
def get_tokens_unprocessed(self, text, stack=('root',)):
""" Split ``text`` into (tokentype, text) pairs.
Monkeypatched to store the final stack on the object itself.
"""
pos = 0
tokendefs = self._tokens
if hasattr(self, '_saved_state_stack'):
statestack = list(self._saved_state_stack)
else:
statestack = list(stack)
statetokens = tokendefs[statestack[-1]]
while 1:
for rexmatch, action, new_state in statetokens:
m = rexmatch(text, pos)
if m:
if type(action) is lexer._TokenType:
yield pos, action, m.group()
else:
for item in action(self, m):
yield item
pos = m.end()
if new_state is not None:
示例2: get_module_logging
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""Tools and plugins for Veusz, providing Misura Thermal Analysis functionality"""
import veusz.plugins as plugins
import veusz.document as document
import numpy as np
import SmoothDatasetPlugin
from misura.canon.logger import get_module_logging
logging = get_module_logging(__file__)
class CoefficientPlugin(plugins.DatasetPlugin):
"""Calculate a coefficient"""
# tuple of strings to build position on menu
menu = ('Misura', 'Coefficient')
# internal name for reusing plugin later
name = 'Coefficient'
# string which appears in status bar
description_short = 'Calculate coefficient'
# string goes in dialog box
description_full = (
'Calculate a coefficient between a fixed start value and any subsequent value in a curve')
def __init__(self, ds_x='', ds_y='', start=50., percent=0., factor=1.,
reconfigure='Stop', smooth=5, smode='X and Y', linearize=150, ds_out='coeff'):
"""Define input fields for plugin."""
self.fields = [
plugins.FieldDataset('ds_x', 'X Dataset', default=ds_x),
plugins.FieldDataset('ds_y', 'Y Dataset', default=ds_y),