hpw to convert a linux python script ?
apt.shansen at gmail.com
Fri Feb 13 07:37:47 CET 2009
> # Absolute path to the directory that holds media.
> # Example: "/home/media/media.lawrence.com/"
> MEDIA_ROOT = fsroot+'/Projects/PytDj/images/'
> Note that most Windows APIs allow you to use the forward slash as a
> delimiter. It's mostly the command line and Windows Explorer that are
> snotty about insisting on the backslash.
Idle curiosity, why do you prefer that to:
MEDIA_ROOT = os.path.join(fsroot, 'Projects', 'PytDj', 'images')
Not arguing that one is actually better then the other, just curious.
In my own environment we have grown a whole big filesystem abstraction
layer because we have to be able to address the same resources on
network volumes in the same client on multiple OS's (mainly windows
and mac presently, but a linux client has long been a
consideration),... and on the mac having to sometimes use mac paths
(":this:that:other") and sometimes posix paths ("/this/that/other")
depending on what API layer I'm poking at in a given point of view...
so personally I just end up being mildly curious how everyone else
handles paths and such.
Cuz it was quite a bit of a pain early on.
More information about the Python-list