Stephen Hansen wrote: >> # 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. > Going for "good enough", I suppose. It's more readable, at least, not that that makes a *huge* difference.
> 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. The old Mac paths would indeed require your solution, which is strictly speaking the best. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list