(self, to_expand)
return to_expand
e.g. self.goto = "a/b/c/d/", then to put cursor onto d, it should be
        to_expand = ["a/", "a/b/", "a/b/c/"] (items order in list dont matter)
e.g. self.goto = "a/b/c/d/", then to put cursor onto d, it should be
        to_expand = ["a/", "a/b/", "a/b/c/"] (items order in list dont matter)
e . g . self . goto = a / b / c / d / then to put cursor onto d it should be to_expand = [ a / a / b / a / b / c / ] ( items order in list dont matter )
def expand_goto(self, to_expand):
        '''e.g. self.goto = "a/b/c/d/", then to put cursor onto d, it should be
        to_expand = ["a/", "a/b/", "a/b/c/"] (items order in list dont matter)
        '''
        to_expand = to_expand or []
        goto = self.goto
        while len(goto.split(os.sep)) > 2:
            parent = dirname(goto) + os.sep
            to_expand.append(parent)
            goto = parent.rstrip(os.sep)
        return to_expand
def expand_goto ( self , to_expand ) : to_expand = to_expand or [ ] goto = self . goto while len ( goto . split ( os . sep ) ) > 2 : parent = dirname ( goto ) + os . sep to_expand . append ( parent ) goto = parent . rstrip ( os . sep ) return to_expand