def gen_variable_completions(self, word, env):
        """Generate a sequence of possible variable completions for ``word``.

        :param word: the word to complete
        :param env: the environment
        """
        # ignore the first character, which is a dollar sign
        var = word[1:]
        for k in env:
            if k.startswith(var):
                yield "$" + k
def gen_variable_completions ( self , word , env ) : var = word [ 1 : ] for k in env : if k . startswith ( var ) : yield "$" + k
Generate a sequence of possible variable completions for ``word``.

        :param word: the word to complete
        :param env: the environment