os.path.join

Michael Bentley michael at jedimindworks.com
Tue May 1 22:26:26 EDT 2007


On May 1, 2007, at 8:36 PM, Elliot Peele wrote:

> Why does os.path.join('/foo', '/bar') return '/bar' rather than
> '/foo/bar'? That just seems rather counter intuitive.

It's the leading slash in '/bar'.  os.path.join('/foo', 'bar')  
returns '/foo/bar'.




More information about the Python-list mailing list