def complete(self, text, state):
        if state == 0:
            self.matches = []
            if "." in text:
                for name, obj in self.namespace.items():
                    for key in dir(obj):
                        if key.startswith("__"):
                            continue
                        lname = "%s.%s" % (name, key)
                        if lname.startswith(text):
                            self.matches.append(lname)
            else:
                for key in self.globalNamespace:
                    if key.startswith(text):
                        self.matches.append(key)
        try:
            return self.matches[state]
        except __HOLE__:
            return None
dataset/ETHPy150Open kdart/pycopia/fepy/pycopia/fepy/CLI.py/Completer.complete