import urlparse print urlparse.urlunsplit(('http','www.sharejs.org:80', '/faq.cgi','src=fie',''))