This is a development version (9.18.0.dev) and may be unstable.Go to latest (9.17.0)
{ } Raw JSON

bundles / IPython 9.18.0.dev / IPython / utils / openpy / strip_encoding_cookie

function

IPython.utils.openpy:strip_encoding_cookie

source: /IPython/utils/openpy.py:45

Signature

def strip_encoding_cookie(filelike: Iterable[str]) → Generator[str]

Summary

Generator to pull lines from a text-mode file, skipping the encoding cookie if it is found in the first two lines.

Aliases

  • IPython.lib.demo.openpy.strip_encoding_cookie