LayerContainerReader

class wwt_data_formats.layers.LayerContainerReader(stream)[source]

Bases: object

A collection of layers and reference frames.

Attributes Summary

layers

Methods Summary

close()

from_file(path)

Deserialize layers from a WWTL “file cabinet” file.

read_layer_file(layer, extension)

Read a data file associated with a layer in this container.

Attributes Documentation

layers

Methods Documentation

close()[source]
classmethod from_file(path)[source]

Deserialize layers from a WWTL “file cabinet” file.

Parameters
pathstring

The path of the file-cabinet file.

Returns
An initialized instance of the class.
read_layer_file(layer, extension)[source]

Read a data file associated with a layer in this container.

Parameters
layerLayer

One of the layer objects found in this container.

extensionstring

The file extension of the associated data file, including a leading period. For instance, “.txt”.

Returns
The contents of the data file as a bytes object.