What's the perfect (OS independent) way of storing filepaths ?
Bruno Desthuilliers
bdesth.quelquechose at free.quelquepart.fr
Mon Oct 20 13:33:57 EDT 2008
More information about the Python-list mailing list
Mon Oct 20 13:33:57 EDT 2008
- Previous message (by thread): What's the perfect (OS independent) way of storing filepaths ?
- Next message (by thread): What's the perfect (OS independent) way of storing filepaths ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Eric Wertman a écrit :
>>> I (again) wonder what's the perfect way to store, OS-independent,
>>> filepaths ?
>
> I'm in agreement that perfect probably isn't applicable. If I were
> doing this myself, I might store the information in a tuple:
>
> base = 'some root structure ('/' or 'C')
make it "C:\"
> path = ['some','set','of','path','names']
> filename = 'somefile.ext'
>
> pathdata = (root,path,filename)
>
> and write a couple of simple functions to reconstruct them based on the os.
like, err, os.path.join ?
- Previous message (by thread): What's the perfect (OS independent) way of storing filepaths ?
- Next message (by thread): What's the perfect (OS independent) way of storing filepaths ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list