
Nov. 4, 2013
3:22 p.m.
anatoly techtonik <techtonik@gmail.com> writes:
Right. But I am working more with URL paths nowadays. In there if I want to join two paths, no matter if 2nd starts with slash or not, I don't really expect the 2nd to rewrite the first.
Then you're not using the right tool: ‘os.path’ is specifically about filesystem paths. URLs follow different rules, as you say; you should be using ‘urllib.parse’ <URL:http://docs.python.org/3/library/urllib.parse.html>. -- \ “Our task must be to free ourselves from our prison by widening | `\ our circle of compassion to embrace all humanity and the whole | _o__) of nature in its beauty.” —Albert Einstein | Ben Finney