[Pythonmac-SIG] os.path.join()

Chris Walker cwalker@pixar.com
Thu, 4 Mar 1999 17:37:03 -0800


I'm writing a program to copy many files of certain types to a network volume.
I'm using os.path.join() to attach a directory to the front of the absolute
paths of the files to mimic the directory structure on the network volume.

The net volume is mounted as 'cwalker', and the drive is called 'Macintosh HD'.

>>> import os
>>> os.path.join('cwalker', 'Macintosh HD:Devel:Python:myscript')
'Macintosh HD:Devel:Python:myscript'

I'm using string.join() to get around it for now, but os.path.join() seems like
the cross-platform, 'right' way to do it.

What I'd like it to return is 'cwalker:Macintosh HD:Devel:Python:myscript'.  Is
this the way it's supposed to behave?  If so, why?

---
Chris Walker
Pixar Animation Studios
UNIX Systems Administrator
(510) 620-3736
cwalker@pixar.com

If it wasn't for disappointment,
	I wouldn't have any appointments.