import urlparse print urlparse.urljoin('http://www.sharejs.com/', '/other/path')