Ned Deily <n...@acm.org> added the comment:

os.path.join is working as documented. See 
http://docs.python.org/library/os.path.html#os.path.join

"If any component is an absolute path, all previous components (on Windows, 
including the previous drive letter, if there was one) are thrown away, and 
joining continues." ... "This means that an empty last part will result in a 
path that ends with a separator."  So, to have the path end with a separator, 
use an empty string rather than '/' as the last component.

>>> import os
>>> os.path.join('/','Users', 'nad')
'/Users/nad'
>>> os.path.join('/','Users', 'nad', '')
'/Users/nad/'

----------
nosy: +ned.deily
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15342>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to