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.
-
abstractmethod close() → None[source]
-
abstract property closed: bool
-
abstractmethod fileno() → int[source]
-
abstractmethod flush() → None[source]
-
abstractmethod isatty() → bool[source]
-
abstract property mode: str
-
abstract property name: str
-
abstractmethod read(n: int = -1) → AnyStr[source]
-
abstractmethod readable() → bool[source]
-
abstractmethod readline(limit: int = -1) → AnyStr[source]
-
abstractmethod readlines(hint: int = -1) → List[source]
-
abstractmethod seek(offset: int, whence: int = 0) → int[source]
-
abstractmethod seekable() → bool[source]
-
abstractmethod tell() → int[source]
-
abstractmethod truncate(size: int = None) → int[source]
-
abstractmethod writable() → bool[source]
-
abstractmethod write(s: AnyStr) → int[source]
-
abstractmethod writelines(lines: List) → None[source]