Re: Full splitting of a file's pathname

2006-07-10 Thread Simon Forman
BartlebyScrivener wrote: > 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 There's also os.path.sep, from the docs: "The character used by the operating system to separate pathna

Re: Full splitting of a file's pathname

2006-07-10 Thread Iain King
tac-tics wrote: > 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', 'b

RE: Full splitting of a file's pathname

2006-07-10 Thread Kerry, Richard
y, Richard. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of BartlebyScrivener Sent: 10 July 2006 15:52 To: python-list@python.org Subject: Re: Full splitting of a file's pathname I don't know if it's "standard," but why not just:

Re: Full splitting of a file's pathname

2006-07-10 Thread BartlebyScrivener
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

Full splitting of a file's pathname

2006-07-10 Thread tac-tics
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