:right-sidebar: True IOChannel =================================================================== .. currentmodule:: gi.repository.GLib .. class:: IOChannel(*args, **kwargs) :no-contents-entry: :Constructors: :: IOChannel() new_file(filename:str, mode:str) -> GLib.IOChannel unix_new(fd:int) -> GLib.IOChannel Methods ------- .. rst-class:: interim-class .. class:: IOChannel :no-index: .. method:: add_watch(condition, callback, *user_data, **kwargs) :param condition: :param callback: :param user_data: :param kwargs: .. method:: next() .. method:: read(max_count=-1) Reads data from a :obj:`~gi.repository.GLib.IOChannel`. .. deprecated:: 2.2 Use :func:`~gi.repository.GLib.IOChannel.read_chars` instead. :param max_count: .. method:: readline(size_hint=-1) :param size_hint: .. method:: readlines(size_hint=-1) :param size_hint: .. method:: seek(offset, whence=0) Sets the current position in the :obj:`~gi.repository.GLib.IOChannel`, similar to the standard library function fseek(). .. deprecated:: 2.2 Use :func:`~gi.repository.GLib.IOChannel.seek_position` instead. :param offset: an offset, in bytes, which is added to the position specified by ``type`` :param whence: .. method:: write(buf, buflen=-1) Writes data to a :obj:`~gi.repository.GLib.IOChannel`. .. deprecated:: 2.2 Use :func:`~gi.repository.GLib.IOChannel.write_chars` instead. :param buf: the buffer containing the data to write :param buflen: .. method:: writelines(lines) :param lines: