Bases: Generic
Generic base class for TextIO and BinaryIO.
This is an abstract, generic version of the return of open().
NOTE: This does not distinguish between the different possible
classes (text vs. binary, read vs. write vs. read/write,
append-only, unbuffered). The TextIO and BinaryIO subclasses
below capture the distinctions between text vs. binary, which is
pervasive in the interface; however we currently do not offer a
way to track the other distinctions in the type system.
-
abstract close() → None[source]
-
abstract property closed: bool
-
abstract fileno() → int[source]
-
abstract flush() → None[source]
-
abstract isatty() → bool[source]
-
abstract property mode: str
-
abstract property name: str
-
abstract read(n: int = -1) → AnyStr[source]
-
abstract readable() → bool[source]
-
abstract readline(limit: int = -1) → AnyStr[source]
-
abstract readlines(hint: int = -1) → List[source]
-
abstract seek(offset: int, whence: int = 0) → int[source]
-
abstract seekable() → bool[source]
-
abstract tell() → int[source]
-
abstract truncate(size: int = None) → int[source]
-
abstract writable() → bool[source]
-
abstract write(s: AnyStr) → int[source]
-
abstract writelines(lines: List) → None[source]