Skip to main content

gzFile

Standard library class internal.file.gzFile View source
class gzFile
@tuple
class gzFile[T]
Fields 1
T type
Constructors 2
__new__
__new__(fp: cobj, mode: str)
Defined in internal.file
__new__
__new__(path: str, mode: str, compresslevel: int = 9, encoding: str = "utf-8", errors: str = "strict", newline: Optional[str] = None)
Defined in internal.file
Methods 8
close
close(self: Self)
Defined in internal.file
readlines
readlines(self: Self, /) -> List[T]
Defined in internal.file
readline
readline(self: Self) -> T
Defined in internal.file
write
write(self: Self, s: T) -> int
Defined in internal.file
read
read(self: Self, sz: int = -1) -> T
Defined in internal.file
tell
tell(self: Self) -> int
Defined in internal.file
seek
seek(self: Self, offset: int, whence: int)
Defined in internal.file
flush
flush(self: Self)
Defined in internal.file
Special methods 4
__iter__
__iter__(self: Self, /) -> Generator[T]
Defined in internal.file
__enter__
__enter__(self: Self, /)
Defined in internal.file
__exit__
__exit__(self: Self, /)
Defined in internal.file
__file_write_gen__
__file_write_gen__[T: type](self: Self, g: Generator[T])
Defined in internal.file