def read_py_url(url, errors='replace', skip_encoding_cookie=True):
 from urllib.request import urlopen
 response = urlopen(url)
 buffer = io.BytesIO(response.read())
 return source_to_unicode(buffer, errors, skip_encoding_cookie)

def read_py_url ( url , errors = 'replace' , skip_encoding_cookie = True ) : from urllib . request import urlopen response = urlopen ( url ) buffer = io . BytesIO ( response . read ( ) ) return source_to_unicode ( buffer , errors , skip_encoding_cookie )
read a python file from a url .