{ } Raw JSON

bundles / numpy 2.4.4 / numpy / f2py / crackfortran / openhook

function

numpy.f2py.crackfortran:openhook

source: /numpy/f2py/crackfortran.py :299

Signature

def   openhook ( filename mode )

Summary

Ensures that filename is opened with correct encoding parameter.

Extended Summary

This function uses charset_normalizer package, when available, for determining the encoding of the file to be opened. When charset_normalizer is not available, the function detects only UTF encodings, otherwise, ASCII encoding is used as fallback.

Aliases

  • numpy.f2py.crackfortran.openhook