Full splitting of a file's pathname

BartlebyScrivener rpdooling at gmail.com
Mon Jul 10 10:52:13 EDT 2006


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




More information about the Python-list mailing list