InfoBase

class baseband.base.file_info.InfoBase(parent=None)[source] [edit on github]

Bases: object

Container providing a standardized interface to file information.

In order to ensure that information is always returned, all access to the parent should be via info_item, which ensures that any errors are stored in self.errors. In addition, it may be useful to capture warnings and store them in self.warnings.

The instance evaluates as True if the underlying file is of the right format, and can thus, at least in principle, be read (though more information may be needed, given in missing, or the file may be corrupt futher on).

Parameters:
parentinstance, optional

Instance of the file or stream reader the info instance is attached too. None if it is the class version.

Attributes Summary

attr_names

Attributes that the container provides.

closed

Whether parent is closed

Methods Summary

__call__()

Create a dict with file information.

Attributes Documentation

attr_names = ()

Attributes that the container provides.

closed

Whether parent is closed

Methods Documentation

__call__()[source] [edit on github]

Create a dict with file information.

This includes information about checks done, possible missing information, as well as possible warnings and errors.