What's the perfect (OS independent) way of storing filepaths ?



hello,

I (again) wonder what's the perfect way to store, OS-independent, filepaths ?
I can think of something like:
- use a relative path if drive is identical to the application (I'm still a Windows guy)
- use some kind of OS-dependent translation table if on another drive
- use ? if on a network drive

I'm interested what you all use for this kind of problem.
And I wonder why there isn't a standard solution / library in Python available.

thanks,
Stef Mientki
.



Relevant Pages

  • Re: Links and graphics in Access
    ... Just store the file name in the database, then on your page create a relative path to the location ... Never heard of an security issues related to storing hyperlink in a database. ...
    (microsoft.public.frontpage.client)
  • Re: Databases
    ... Say you store your forms, your data and your testdata in the directories ... Then relative path will ... be invalid and in this case VFP opens database in the default directory. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: relative path in web.config
    ... server transplants it for some reason on my system32 directory. ... > relative path to an absolute path. ... For example you could store: ...
    (microsoft.public.dotnet.framework.aspnet)
  • Using relative path in java programs - how ?
    ... I wrote a new servlet that uses a configuration file to store ... The problem is that I want to use a relative path when accessing this ...
    (comp.lang.java.programmer)
  • Re: Whats the perfect (OS independent) way of storing filepaths ?
    ... I'm in agreement that perfect probably isn't applicable. ... I might store the information in a tuple: ... and write a couple of simple functions to reconstruct them based on the os. ...
    (comp.lang.python)