Nov. 4, 2013
9:25 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 are using the wrong tool for the job: ‘os.path’ is specifically for manipulating OS filesystem paths. URLs follow different rules, as you say. For those, use the standard library <URL:http://docs.python.org/3/library/urllib.parse.html> ‘urllib.parse’ module. -- \ “When I was born I was so surprised I couldn't talk for a year | `\ and a half.” —Gracie Allen | _o__) | Ben Finney