Network Python

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