def parse_fs_command(self, command, nargs=0, ret=str):
        """parses a filesystem command. returns the interface and the actual command.
nargs specifies the number of arguments, -1 means any number."""
        args = shlex.split(command)
        if len(args) < 1 or (len(args) != nargs + 1 and nargs != -1):
            self.stdout.write(Text("Error: invalid argument count!\n", "red"))
            return None, None
        i = args[0]
        if i not in self.FSIs:
            self.stdout.write(Text("Error: Interface not found!\n", "red"))
            return None, None
        if ret == str:
            if len(args) > 1:
                args = " ".join(args[1:])
            else:
                args = ""
        elif ret == tuple:
            args = args[1:]
        else:
            raise ValueError("Unknown return type!")
        fsi = self.FSIs[i]
        return fsi, args
parses a filesystem command. returns the interface and the actual command.
nargs specifies the number of arguments, -1 means any number.
bin/mc.py