#NEWLINE# def has_in_url_path( url , sub ) : #NEWLINE# #INDENT# 'Test if the `sub` string is in the `url` path.' #NEWLINE# ( scheme , netloc , path , query , fragment ) = urlparse . urlsplit ( url ) #NEWLINE# return ( sub in path )