httk.core.datastream.textstream_filename_view

Classes

TextstreamFilenameView

A view presenting an underlying data streaming backend via a filename.

Module Contents

class httk.core.datastream.textstream_filename_view.TextstreamFilenameView(obj, **hints)

Bases: httk.core.datastream.textstream_view.TextstreamView, str

A view presenting an underlying data streaming backend via a filename. This view is probably mostly useful for providing filenames to functions that will open them. Note: this view is not lazy (this is impossible for views inherting str, since str is immutable)

Raises TypeError if created with a streaming data source that does not have a name.

Parameters:
Raises:

TypeError – If the source has no filename.

unwrap()

Return the raw representation of the wrapped backend.

Returns:

The backend’s most raw available representation.

Return type:

Any

unview()

Return the presented filename as a plain string.

Returns:

The filename represented by this view.

Return type:

str