Exemplo n.º 1
0
 def completer(self):
     """Command completer.
     If cursor is after path, returns PathCompleter or GlobCompleter
     """
     if self._path is not None:
         return PathCompleter(self._path)
     else:
         try:
             curDir = os.getcwd()
         except:
             return None
         return PathCompleter(curDir + '/')
Exemplo n.º 2
0
 def completer(self):
     """Command Completer.
     Return PathCompleter.
     """
     if self._path is not None:
         return PathCompleter(self._path)
     else:
         try:
             curDir = os.getcwd()
         except:
             return None
         return PathCompleter(curDir + '/')
Exemplo n.º 3
0
 def completer(self, text, pos):
     """Command Completer.
     Returns PathCompleter, if cursor stays after path
     """
     if pos == self._pathLocation + len(self._path) or \
        (not self._path and pos == len(text)):
         return PathCompleter(self._path, pos - self._pathLocation)
     else:
         return None