def _has_explicit_scheme(url):
 return (url.isValid() and url.scheme() and (url.host() or url.path()) and (' ' not in url.path()) and (not url.path().startswith(':')))

def _has_explicit_scheme ( url ) : return ( url . isValid ( ) and url . scheme ( ) and ( url . host ( ) or url . path ( ) ) and ( ' ' not in url . path ( ) ) and ( not url . path ( ) . startswith ( ':' ) ) )
check if a url has an explicit scheme given .