[Pythonmac-SIG] Behavior of os.path.join() on the Mac
Jack Jansen
jack@oratrix.nl
Fri, 19 Jan 2001 09:54:16 +0100
> I'm familiar with Python on Linux, but the behavior of os.path.join()
> in MacPython is confusing me:
> [...]
Jon,
I think that what confuses you is Mac pathnames. Whereas on unix "a/b" is a
relative path and "/a/b" is an absolute path on the mac it's the other way
around: "a:b" is an absolute path and ":a:b" is a relative path. So in your
example you're joining all absolute paths, and the join of two absolute paths
is by definition the second path.
There is an exception to this rule, by the way: a filename without any colon
at all is a relative path.
--
Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm