b.textfile : module documentation

Part of bzrlib

Utilities for distinguishing binary files from text files
Function text_file Produce a file iterator that is guaranteed to be text, without seeking.
Function check_text_lines Raise BinaryFile if the supplied lines contain NULs.
Function check_text_path Check whether the supplied path is a text, not binary file.
def text_file(input):
Produce a file iterator that is guaranteed to be text, without seeking. BinaryFile is raised if the file contains a NUL in the first 1024 bytes.
def check_text_lines(lines):
Raise BinaryFile if the supplied lines contain NULs. Only the first 1024 characters are checked.
def check_text_path(path):
Check whether the supplied path is a text, not binary file. Raise BinaryFile if a NUL occurs in the first 1024 bytes.
API Documentation for Bazaar, generated by pydoctor at 2019-12-12 00:44:34.