def do_shell(self, command): """Execute a command as if at the OS prompt. Usage: shell <command> [arguments]""" proc = subprocess.Popen(command, stdout=self.stdout, shell=True) proc.communicate()