Full splitting of a file's pathname

tac-tics tactics40 at gmail.com
Mon Jul 10 10:28:05 EDT 2006


I know about os.path.split(), but Is there any standard function for
"fully" splitting a file's pathname? A function that is the opposite of
the os.path.join() function? For example:

>>> ret = myster_function(./foo/bar/moo/lar/myfile.txt)
>>> print ret
['.', 'foo', 'bar', 'moo', 'lar', 'myfile.txt']

In the meanwhile, I'll do this by hand. I'm just curious if there is a
standard way to do this.




More information about the Python-list mailing list