def start(self):
self.shell.exit_now = False<EOL>if self.control_stream:<EOL><INDENT>self.control_stream.on_recv(self.dispatch_control, copy=False)<EOL><DEDENT>def make_dispatcher(stream):<EOL><INDENT>def dispatcher(msg):<EOL><INDENT>return self.dispatch_shell(stream, msg)<EOL><DEDENT>return dispatcher<EOL><DEDENT>for s in self.shell_streams:<EOL><INDENT>s.on_recv(make_dispatcher(s), copy=False)<EOL><DEDENT>
register dispatchers for streams