Elliot Peele <[EMAIL PROTECTED]> wrote:

>On Tue, 2007-05-01 at 19:27 -0700, 7stud wrote:
>> On May 1, 7:36 pm, Elliot Peele <[EMAIL PROTECTED]> wrote:
>> > Why does os.path.join('/foo', '/bar') return '/bar' rather than
>> > '/foo/bar'? That just seems rather counter intuitive.
>> >
>> > Elliot
>> 
>> join(        path1[, path2[, ...]])
>> Join one or more path components intelligently. If any component is an
>> absolute path, all previous components (on Windows, including the
>> previous drive letter, if there was one) are thrown away...
>
>Yes, but that still doesn't answer my question as to why os.path.join
>works that way. I understand that that is how it is written, but why?

It's behavior is exactly the same as if you did a series of "cd" commands
at the shell with the same parameters.
-- 
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to