##// END OF EJS Templates
split shell.system into shell.system_raw/system_piped...
split shell.system into shell.system_raw/system_piped system_raw calls os.system, system_piped uses pexpect/utils.platform magic use system_raw in Terminal except on Windows and in tests use system_piped elsewhere closes gh-297 closes gh-457

File last commit:

r3603:600411fc
r3909:bdb012ce
Show More
log.py
23 lines | 687 B | text/x-python | PythonLexer
import logging
from logging import INFO, DEBUG, WARN, ERROR, FATAL
import zmq
from zmq.log.handlers import PUBHandler
class EnginePUBHandler(PUBHandler):
"""A simple PUBHandler subclass that sets root_topic"""
engine=None
def __init__(self, engine, *args, **kwargs):
PUBHandler.__init__(self,*args, **kwargs)
self.engine = engine
@property
def root_topic(self):
"""this is a property, in case the handler is created
before the engine gets registered with an id"""
if isinstance(getattr(self.engine, 'id', None), int):
return "engine.%i"%self.engine.id
else:
return "engine"