def guess_scheme(url):
 parts = urlparse(url)
 if parts.scheme:
  return url
 if re.match('^                   # start with...\n                    (\n                        \\.              # ...a single dot,\n                        (\n                            \\. | [^/\\.]+  # optionally followed by\n                        )?                # either a second dot or some characters\n                    )?      # optional match of ".", ".." or ".blabla"\n                    /       # at least one "/" for a file path,\n                    .       # and something after the "/"\n                    ', parts.path, flags=re.VERBOSE):
  return any_to_uri(url)
 else:
  return add_http_if_no_scheme(url)

def guess_scheme ( url ) : parts = urlparse ( url ) if parts . scheme : return url if re . match ( '^                   # start with...\n                    (\n                        \\.              # ...a single dot,\n                        (\n                            \\. | [^/\\.]+  # optionally followed by\n                        )?                # either a second dot or some characters\n                    )?      # optional match of ".", ".." or ".blabla"\n                    /       # at least one "/" for a file path,\n                    .       # and something after the "/"\n                    ' , parts . path , flags = re . VERBOSE ) : return any_to_uri ( url ) else : return add_http_if_no_scheme ( url )
return a guess for whether wsgi .