def start(self):
        """Poet server control shell."""

        debug.info('Entering control shell')
        self.conn = PoetSocket(self.s.accept()[0])
        print 'Welcome to posh, the Poet Shell!'
        print 'Running `help\' will give you a list of supported commands.'
        while True:
            try:
                argv = raw_input(POSH_PROMPT).split()
                if not argv:
                    continue

                if argv[0] in self.builtins:
                    self.builtins[argv[0]](argv)
                elif argv[0] in module.server_commands:
                    try:
                        module.server_commands[argv[0]](self, argv)
                    except Exception as e:
                        self.info(str(e.args))
                else:
                    self.info('{}: command not found'.format(argv[0]))

                # see comment above for self.continue_ for why this is here
                if not self.continue_:
                    break
            except __HOLE__:
                print
                continue
            except EOFError:
                print
                break
        self.conn.send('fin')
        debug.info('Exiting control shell')
dataset/ETHPy150Open mossberg/poet/server.py/PoetServer.start