'Provides path completion for use with readline.
:param str text: text to offer completions for
:param int state: which completion to return
:returns: possible completion for text or ``None`` if all
completions have been returned
:rtype: str'

def complete(self, text, state):

    if (state == 0):
        self._iter = glob.iglob((text + '*'))
    return next(self._iter, None)
