StringStream

from panda3d.core import StringStream
class StringStream

Bases:

Bases: iostream

A bi-directional stream object that reads and writes data to an internal buffer, which can be retrieved and/or set as a string in Python 2 or a bytes object in Python 3.

Inheritance diagram

Inheritance diagram of StringStream

__init__()
__init__(source: object)
clear_data()

Empties the buffer.

property data
Getter

Returns the contents of the data stream as a string.

Setter

Replaces the contents of the data stream. This implicitly reseeks to 0.

Replaces the contents of the data stream. This implicitly reseeks to 0.

get_data() object

Returns the contents of the data stream as a string.

get_data_size() int

Returns the number of characters available to be read from the data stream.

set_data(data: object)