Skip to main content

FileText

Gives you a file-like object for reading text, and you will get a str data from it. The default mode of this class is mode="r".

Constructor

Signature

def FileText(
args: Any,
kwargs: Any
) - > null

Parameters

NameTypeDescription
argsAnyPositional arguments passed to the parent io.TextIOWrapper constructor.
kwargsAnyKeyword arguments passed to the parent io.TextIOWrapper constructor, typically including 'mode'.

Signature

def FileText(
buffer: io.BufferedIOBase,
encoding: str,
errors: str,
newline: str,
line_buffering: bool = False,
write_through: bool = False
) - > null

Parameters

NameTypeDescription
bufferio.BufferedIOBaseThe underlying binary stream to wrap for text-based I/O operations.
encodingstrThe name of the encoding used to decode or encode the file contents.
errorsstrThe error handling scheme to use for encoding and decoding errors.
newlinestrControls how line endings are handled during text processing.
line_bufferingbool = FalseWhether to enable line buffering for the text stream.
write_throughbool = FalseWhether to bypass buffering and write directly to the underlying binary stream.