• ric

    A little nifty code I wrote to show the current working directory in the file browser. It works by pasting into class FilebrowserController in filebrowser.py. Tell me what you think :)

    def tableview_title_for_header(self, tableview, section):
            lst = str(os.getcwd()).split("/")
            for idx, item in enumerate(lst):
                if len(item) > 20:
                    item = item[:20]+".."
                    lst[idx] = item
            if len(lst) > 3:
                return "../"+"/".join(lst[-3:])
            else: return "/".join(lst)

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!