class documentation
class TIVar: (source)
Constructors: TIVar.open(filename)
, TIVar(name, header, model, data)
Container for var files
A var file is composed of a header and any number of entries (though most have only one).
Class Method | open |
Creates a new var from a file given a filename |
Method | __bool__ |
No summary |
Method | __bytes__ |
No summary |
Method | __copy__ |
No summary |
Method | __eq__ |
Determines if two vars contain the same entries |
Method | __init__ |
Creates an empty var with a specified name, header, and targeted model |
Method | __len__ |
No summary |
Method | add |
Adds an entry to this var |
Method | bytes |
No summary |
Method | clear |
Removes all entries from this var |
Method | load |
Loads a byte string or bytestream into this var |
Method | load |
Loads this var from a file given a file pointer |
Method | save |
Saves this var given a filename |
Method | supported |
Determines whether a given model can support this var |
Instance Variable | entries |
Undocumented |
Instance Variable | name |
Undocumented |
Property | checksum |
The checksum for the var |
Property | entry |
The total length of the var entries |
Property | extension |
Determines the var's file extension based on its entries and targeted model |
Property | filename |
Determines the var's filename based on its name, entries, and targeted model |
Property | header |
This var's header |
Property | is |
Whether this var contains no entries |
Property | model |
This var's targeted model |
Instance Variable | _header |
Undocumented |
Instance Variable | _model |
Undocumented |
Determines if two vars contain the same entries
Parameters | |
other:TIVar | The var to check against |
Returns | |
Whether this var is equal to other |
Saves this var given a filename
Parameters | |
filename:str | A filename to save to (defaults to the var's name and extension) |
Determines the var's file extension based on its entries and targeted model
If there is only one entry, that entry's extension for the target model is used. Otherwise, .8xg is used.
Determines the var's filename based on its name, entries, and targeted model
The filename is the concatenation of the var name and extension (see TIVar.extension
).