Skip to main content

helpers.read_input()

Read a UTF-8 input file and strip leading and trailing whitespace.

Usage

Source

helpers.read_input(path)

Parameters

path: Path
Path to the input file.

Returns

str
File text with surrounding whitespace removed.

Raises

FileNotFoundError

If the path does not point to a file.

UnicodeDecodeError
If the file is not valid UTF-8.