:right-sidebar: True IOChannel =================================================================== .. currentmodule:: gi.repository.GObject .. class:: IOChannel(*args, **kwargs) :no-contents-entry: :Constructors: :: IOChannel() new_file(filename:str, mode:str) -> GLib.IOChannel unix_new(fd:int) -> GLib.IOChannel Constructors ------------ .. rst-class:: interim-class .. class:: IOChannel :no-index: .. classmethod:: new_file(filename: str, mode: str) -> ~gi.repository.GLib.IOChannel :param filename: :param mode: .. classmethod:: unix_new(fd: int) -> ~gi.repository.GLib.IOChannel :param fd: Methods ------- .. rst-class:: interim-class .. class:: IOChannel :no-index: .. method:: add_watch(condition, callback, *user_data, priority=0) :param condition: :param callback: :param user_data: :param priority: .. method:: close() -> None .. classmethod:: error_from_errno() -> ~gi.repository.GLib.IOChannelError .. classmethod:: error_quark() -> int .. method:: flush() -> ~gi.repository.GLib.IOStatus .. method:: get_buffer_condition() -> ~gi.repository.GLib.IOCondition .. method:: get_buffer_size() -> int .. method:: get_buffered() -> bool .. method:: get_encoding() -> str .. method:: get_flags() -> ~gi.repository.GLib.IOFlags .. method:: get_line_term() -> tuple[str, int] .. method:: init() -> None .. method:: read(max_count=-1) :param max_count: .. method:: read_chars() -> tuple[~gi.repository.GLib.IOStatus, list[int], int] .. method:: read_line() -> tuple[~gi.repository.GLib.IOStatus, str, int, int] .. method:: read_line_string(buffer: ~gi.repository.GLib.String, terminator_pos: int | None = None) -> ~gi.repository.GLib.IOStatus :param buffer: :param terminator_pos: .. method:: read_to_end() -> tuple[~gi.repository.GLib.IOStatus, list[int]] .. method:: read_unichar() -> tuple[~gi.repository.GLib.IOStatus, str] .. method:: readline(size_hint=-1) :param size_hint: .. method:: readlines(size_hint=-1) :param size_hint: .. method:: seek(offset, whence=0) :param offset: :param whence: .. method:: seek_position(offset: int, type: ~gi.repository.GLib.SeekType) -> ~gi.repository.GLib.IOStatus :param offset: :param type: .. method:: set_buffer_size(size: int) -> None :param size: .. method:: set_buffered(buffered: bool) -> None :param buffered: .. method:: set_encoding(encoding: str | None = None) -> ~gi.repository.GLib.IOStatus :param encoding: .. method:: set_flags(flags: ~gi.repository.GLib.IOFlags) -> ~gi.repository.GLib.IOStatus :param flags: .. method:: set_line_term(line_term: str | None, length: int) -> None :param line_term: :param length: .. method:: shutdown(flush: bool) -> ~gi.repository.GLib.IOStatus :param flush: .. method:: unix_get_fd() -> int .. method:: write(buf, buflen=-1) :param buf: :param buflen: .. method:: write_chars(buf: list[int], count: int) -> tuple[~gi.repository.GLib.IOStatus, int] :param buf: :param count: .. method:: write_unichar(thechar: str) -> ~gi.repository.GLib.IOStatus :param thechar: .. method:: writelines(lines) :param lines: Fields ------ .. rst-class:: interim-class .. class:: IOChannel :no-index: .. attribute:: buf_size .. attribute:: close_on_unref .. attribute:: do_encode .. attribute:: encoded_read_buf .. attribute:: encoding .. attribute:: funcs .. attribute:: is_readable .. attribute:: is_seekable .. attribute:: is_writeable .. attribute:: line_term .. attribute:: line_term_len .. attribute:: partial_write_buf .. attribute:: read_buf .. attribute:: read_cd .. attribute:: ref_count .. attribute:: reserved1 .. attribute:: reserved2 .. attribute:: use_buffer .. attribute:: write_buf .. attribute:: write_cd