class documentation
Open a keyfile for reading.
Example
>>> with Reader("nwn_base.key") as rd: ... data = rd.read_file("doortype.2da") ... print(data)
Parameters | |
filename | The name of the keyfile to open. |
bif | The directory to search for BIF files in. If not provided, the directory containing the keyfile is used. |
Raises | |
ValueError | If the keyfile is not valid. |
FileNotFoundError | If the keyfile or a BIF file is not found. |
Method | __enter__ |
Undocumented |
Method | __exit__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | close |
Closes the main file and all associated BIF files. You should call this method when you are done with the keyfile. It is also called automatically when the object is deleted (eg. via context manager). |
Method | filenames |
Returns all filenames in the keyfile. |
Method | read |
Reads the content of a file from the resource archive. |
Property | build |
The build date when this keyfile was created. |
Class | _BIFF |
Undocumented |
Instance Variable | _bif |
Undocumented |
Instance Variable | _build |
Undocumented |
Instance Variable | _build |
Undocumented |
Instance Variable | _file |
Undocumented |
Instance Variable | _resref |
Undocumented |
Closes the main file and all associated BIF files. You should call this method when you are done with the keyfile. It is also called automatically when the object is deleted (eg. via context manager).