I don't know if it's "standard," but why not just:
dir = './foo/bar/moo/lar/myfile.txt'
dir.split('/')['.', 'foo', 'bar', 'moo', 'lar', 'myfile.txt'] rd -- http://mail.python.org/mailman/listinfo/python-list
I don't know if it's "standard," but why not just:
dir = './foo/bar/moo/lar/myfile.txt'
dir.split('/')['.', 'foo', 'bar', 'moo', 'lar', 'myfile.txt'] rd -- http://mail.python.org/mailman/listinfo/python-list