Beispiel #1
0
 def __init__(self,  mod):
     self.mod = mod
     self.gui = None
     self.telnet=None
     self.client=None
     self._escape_parser=EscapeParser()
     self.console=InteractiveConsole()
     self.wrapper = TextWrapper(width=100, drop_whitespace=False)
     self._closing_down = False
     self.protocols = []
     self.extra_gui = None
     self.macros=gui_macros.copy()
     self.baked_in_macros=gui_macros.copy()
     self.state={}
     self._last_line_end = None
     self.active_channels=['main']
     self.gmcp_handler=None
     self.gmcp={}
     self.server_echo=False
     self.processor_exec = ''
     self.module_name = ''
     self.debug = True
     self.event_handlers={}
     self.reactor = None
     self.total_client_time = 0
     self.block=[]
     self.user_echo = True
Beispiel #2
0
    def __init__(self, factory):
        self.factory = factory
        self.root=self
        self.telnet = None
        self.triggers = []
        self.aliases = []
        self.baked_in_macros = gui_macros.copy()
        self.macros = self.baked_in_macros.copy()
        self.modules_loaded = set()
        self._escape_parser = EscapeParser()
        self.tracing = False
        self.server_echo = False
        self.console_ns = {'realm': self}
        self.console = InteractiveConsole(self.console_ns)
        self._last_line_end = None
        self.wrapper = TextWrapper(width = 100, 
                                   drop_whitespace = False)

        self.protocols = []
        self._closing_down = False
        self.gmcp_handler = None
        self.gmcp_events=[]
        self.gmcp={}
        self.state={}
        self.module_settings_dir=''
        
        self.active_channels=['main']
Beispiel #3
0
 def test_baked_in_macros_loaded_after_clear(self):
     self.realm.baked_in_macros['f'] = 'foo'
     self.realm.clear_modules()
     res = gui_macros.copy()
     res['f'] = 'foo'
     assert self.realm.macros == res