SimpleIOStream
Added in version 2.44.
Superclasses: IOStream
, Object
GSimpleIOStream
creates a IOStream
from an arbitrary
InputStream
and OutputStream
. This allows any pair of
input and output streams to be used with IOStream
methods.
This is useful when you obtained a InputStream
and a
OutputStream
by other means, for instance creating them with
platform specific methods as
`:func:`~gi.repository.Gio.UnixInputStream.new`
<../gio-unix/ctor.UnixInputStream.new.html>`_
(from gio-unix-2.0.pc
/ GioUnix-2.0
), and you want to
take advantage of the methods provided by IOStream
.
Constructors
- class SimpleIOStream
- classmethod new(input_stream: InputStream, output_stream: OutputStream) IOStream
Creates a new
GSimpleIOStream
wrappinginput_stream
andoutput_stream
. See alsoIOStream
.Added in version 2.44.
- Parameters:
input_stream – a
InputStream
.output_stream – a
OutputStream
.
Properties
- class SimpleIOStream
- props.input_stream: InputStream
The
InputStream
to read from.Added in version 2.44.
- props.output_stream: OutputStream
The
OutputStream
to write to.Added in version 2.44.