from panda3d.core import OSubStream
class OSubStream

Bases: ostream

An ostream object that presents a subwindow into another ostream. The first character written to this stream will be the “start” character in the dest istream; no characters may be written to character “end” or later (unless end is zero).

The dest stream must be one that we can randomly seek within. The resulting OSubStream will also support arbitrary seeks.

Inheritance diagram

Inheritance diagram of OSubStream

__init__() → None
__init__(dest: OStreamWrapper, start: streamoff, end: streamoff, append: bool) → None
close() → OSubStream

Resets the SubStream to empty, but does not actually close the dest ostream.

Return type


open(dest: OStreamWrapper, start: streamoff, end: streamoff, append: bool) → OSubStream

Starts the SubStream reading from the indicated dest, with the first character being the character at position “start” within the dest, for end - start total characters. The character at “end” within the dest will never be read; this will appear to be EOF.

If end is zero, it indicates that the OSubStream will continue until the end of the dest stream.

Return type