bundles / IPython 9.3.0 / IPython / utils / openpy / read_py_url
function
IPython.utils.openpy:read_py_url
source: /IPython/utils/openpy.py :82
Signature
def read_py_url ( url , errors = replace , skip_encoding_cookie = True ) Summary
Read a Python file from a URL, using the encoding declared inside the file.
Parameters
url: strThe URL from which to fetch the file.
errors: strHow to handle decoding errors in the file. Options are the same as for bytes.decode(), but here 'replace' is the default.
skip_encoding_cookie: boolIf True (the default), and the encoding declaration is found in the first two lines, that line will be excluded from the output.
Returns
: A unicode string containing the contents of the file.
Aliases
-
IPython.utils.openpy.read_py_url