On this page
  1. fileinput.hook_encoded
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

fileinput.hook_encoded

Prev: fileinput.hook_compressed | Up: fileinput | Next: fileinput.input
Rel: fileinput.close, fileinput.FileInput, fileinput.filelineno, fileinput.filename
Ref: docs.python.org — fileinput.hook_encoded
Tags: #public #python3 #stdlib #fileinput


Import

import fileinput
from fileinput import hook_encoded

Signature & Overview

fileinput.hook_encoded(encoding, errors=None)

fileinput.hook_encoded() function.

Usage

import fileinput

hook = fileinput.hook_encoded("utf-8", errors="replace")
assert callable(hook)

Gotchas

REPL Inspect

from fileinput import hook_encoded
help(hook_encoded)

Linked from

Related notes