GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Table of Contents
  • wx.StreamBase
  • Show Source
  • index
  • modules
  • next
  • previous
  • Home
  • Gallery
  • wx

This view

  • Original page
  • New address

GeezerVison is showing docs.wxpython.org — wx.StreamBase — wxPython 4.3.2 Docs

phoenix_title wx.StreamBase¶

This class is the base class of most stream related classes in wxWidgets.

It must not be used directly.

See also

StreamBuffer


class_hierarchy Class Hierarchy¶

Inheritance diagram for class StreamBase:

Inheritance diagram of StreamBase


sub_classes Known Subclasses¶

wx.InputStream, wx.OutputStream


method_summary Methods Summary¶

__init__

Creates a dummy stream object.

GetLastError

This function returns the last error.

GetLength

Returns the length of the stream in bytes.

GetSize

This function returns the size of the stream.

IsOk

Returns True if no error occurred on the stream.

IsSeekable

Returns True if the stream supports seeking to arbitrary offsets.

Reset

Resets the stream state.


property_summary Properties Summary¶

LastError

See GetLastError

Length

See GetLength

Size

See GetSize


api Class API¶

class wx.StreamBase(object)¶

Possible constructors:

StreamBase() -> None

This class is the base class of most stream related classes in wxWidgets.


Methods¶

__init__(self)¶

Creates a dummy stream object.

It doesn’t do anything.

Return type:

None



GetLastError(self)¶

This function returns the last error.

Return type:

wx.StreamError



GetLength(self)¶

Returns the length of the stream in bytes.

If the length cannot be determined (this is always the case for socket streams for example), returns InvalidOffset .

Return type:

int

Added in version 2.5.4.



GetSize(self)¶

This function returns the size of the stream.

For example, for a file it is the size of the file.

Return type:

int

Warning

There are streams which do not have size by definition, such as socket streams. In that cases, GetSize returns 0 so you should always test its return value.



IsOk(self)¶

Returns True if no error occurred on the stream.

Return type:

bool

See also

GetLastError



IsSeekable(self)¶

Returns True if the stream supports seeking to arbitrary offsets.

Return type:

bool



Reset(self, error=STREAM_NO_ERROR)¶

Resets the stream state.

By default, resets the stream to good state, i.e. clears any errors. Since wxWidgets 2.9.3 can be also used to explicitly set the state to the specified error (the error argument didn’t exist in the previous versions).

Parameters:

error (StreamError)

Return type:

None

See also

GetLastError


Properties¶

LastError¶

See GetLastError



Length¶

See GetLength



Size¶

See GetSize

© Copyright 2012-2026, The wxPython Team. Created using Sphinx 9.1.0 and the python-docs-theme.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.