(self)
Implements the shell
Implements the shell
Implements the shell
def shell(self):
        """Implements the shell"""
        while True:
            cmd = raw_input("# ")
            if cmd == 'exit':
                # exit shell
                break
            elif cmd == 'slarp-shutdown':
                # shutdown remote daemon and exit
                self.send('3')
                break
            elif len(cmd) <= 1:
                continue

            # packets come quick, so we need to start listening first
            tmp = Thread(target=self.receive)
            tmp.start()
            self.send('1' + cmd)
            sleep(.25)
def shell ( self ) : while True : cmd = raw_input ( "# " ) if cmd == 'exit' : # exit shell break elif cmd == 'slarp-shutdown' : # shutdown remote daemon and exit self . send ( '3' ) break elif len ( cmd ) <= 1 : continue # packets come quick, so we need to start listening first tmp = Thread ( target = self . receive ) tmp . start ( ) self . send ( '1' + cmd ) sleep ( .25 )