os.path.join

7stud bbxx789_05ss at yahoo.com
Wed May 2 04:27:49 CEST 2007


On May 1, 7:36 pm, Elliot Peele <ell... at bentlogic.net> 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...



More information about the Python-list mailing list