本文整理汇总了Python中setuptools.compat.urlunparse函数的典型用法代码示例。如果您正苦于以下问题:Python urlunparse函数的具体用法?Python urlunparse怎么用?Python urlunparse使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了urlunparse函数的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: urlparse
scheme, netloc, path, p, q, f = urlparse(url)
=======
scheme, netloc, path, p, q, f = urllib.parse.urlparse(url)
>>>>>>> 54eef0be98b1b67c8507db91f4cfa90b64991027
if not netloc and path.startswith('//') and '/' in path[2:]:
netloc, path = path[2:].split('/',1)
auth, host = splituser(netloc)
if auth:
if ':' in auth:
user, pw = auth.split(':',1)
creds = " --username=%s --password=%s" % (user, pw)
else:
creds = " --username="+auth
netloc = host
<<<<<<< HEAD
url = urlunparse((scheme, netloc, url, p, q, f))
=======
parts = scheme, netloc, url, p, q, f
url = urllib.parse.urlunparse(parts)
>>>>>>> 54eef0be98b1b67c8507db91f4cfa90b64991027
self.info("Doing subversion checkout from %s to %s", url, filename)
os.system("svn checkout%s -q %s %s" % (creds, url, filename))
return filename
@staticmethod
def _vcs_split_rev_from_url(url, pop_prefix=False):
<<<<<<< HEAD
scheme, netloc, path, query, frag = urlsplit(url)
=======
scheme, netloc, path, query, frag = urllib.parse.urlsplit(url)
>>>>>>> 54eef0be98b1b67c8507db91f4cfa90b64991027