Message165363
| Author |
ned.deily |
| Recipients |
fossilet, ned.deily |
| Date |
2012年07月13日.06:58:35 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1342162716.69.0.894901896863.issue15342@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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/' |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年07月13日 06:58:36 | ned.deily | set | recipients:
+ ned.deily, fossilet |
| 2012年07月13日 06:58:36 | ned.deily | set | messageid: <1342162716.69.0.894901896863.issue15342@psf.upfronthosting.co.za> |
| 2012年07月13日 06:58:35 | ned.deily | link | issue15342 messages |
| 2012年07月13日 06:58:35 | ned.deily | create |
|