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


Python config.Application类代码示例

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


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

示例1: wrappedfunc

 def wrappedfunc(nb, resources):
     from IPython.config import Application
     if Application.initialized():
         Application.instance().log.debug(
             "Applying preprocessor: %s", function.__name__
         )
     for worksheet in nb.worksheets:
         for index, cell in enumerate(worksheet.cells):
             worksheet.cells[index], resources = function(cell, resources, index)
     return nb, resources
开发者ID:JamesDavid,项目名称:rpi-ipython-venv,代码行数:10,代码来源:coalescestreams.py

示例2: _logger

def _logger():
    """get the logger for the current Application
    
    the root logger will be used if no Application is running
    """
    if Application.initialized():
        logger = Application.instance().log
    else:
        logger = logging.getLogger()
        if not logger.handlers:
            logging.basicConfig()
    
    return logger
开发者ID:ellbur,项目名称:ipython,代码行数:13,代码来源:pickleutil.py

示例3: get_logger

def get_logger():
    """Grab the global logger instance.

    If a global IPython Application is instantiated, grab its logger.
    Otherwise, grab the root logger.
    """
    global _logger

    if _logger is None:
        from IPython.config import Application
        if Application.initialized():
            _logger = Application.instance().log
        else:
            logging.basicConfig()
            _logger = logging.getLogger()
    return _logger
开发者ID:mattvonrocketstein,项目名称:smash,代码行数:16,代码来源:log.py

示例4: set_engine_logger

def set_engine_logger():
    '''Updates EMA logging on the engines with an EngineLoggerAdapter 
    This adapter injects EMA as a topic into all messages
    '''
    
    logger = Application.instance().log
    logger.setLevel(ema_logging.DEBUG)

    for handler in logger.handlers:
        if isinstance(handler, IPython.kernel.zmq.log.EnginePUBHandler): # @UndefinedVariable
            handler.setLevel(ema_logging.DEBUG)
    
    adapter = EngingeLoggerAdapter(logger, SUBTOPIC)
    ema_logging._logger = adapter
    
    ema_logging.debug('updated logger')
开发者ID:MasterNicknak007,项目名称:EMAworkbench,代码行数:16,代码来源:ema_parallel_ipython.py

示例5: log

 def log(self):
     """use the IPython log by default, falling back on tornado's logger"""
     if Application.initialized():
         return Application.instance().log
     else:
         return app_log
开发者ID:Kiiwi,项目名称:Syssel,代码行数:6,代码来源:handlers.py

示例6:

# IPython.parallel - can I write my own log into the engine logs?
from IPython.config import Application

log = Application.instance().log
开发者ID:fiolbs,项目名称:code_extraction,代码行数:4,代码来源:python_14008.py


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