What's the perfect (OS independent) way of storing filepaths ?
Duncan Booth
duncan.booth at invalid.invalid
Sun Oct 19 11:42:27 EDT 2008
Steven D'Aprano <steve at REMOVE-THIS-cybersource.com.au> wrote:
>>>> import os
>>>> os.path.splitdrive('C://My Documents/My File.txt')
> ('C:\\\\', 'My Documents\\My File.txt')
>
> I had to fake the above output because I'm not running Windows, so
> excuse me if I got it wrong.
Not that it matters, but:
>>> os.path.splitdrive('C://My Documents/My File.txt')
('C:', '//My Documents/My File.txt')
More information about the Python-list
mailing list