Package pyffi :: Package formats :: Package egt
[hide private]
[frames] | no frames]

Package egt

source code

An .egt file contains texture tones for the different races.

Implementation

Regression tests

Read a EGT file

>>> # check and read egt file
>>> stream = open('tests/egt/test.egt', 'rb')
>>> data = EgtFormat.Data()
>>> data.inspect(stream)
>>> # do some stuff with header?
>>> data.read(stream) # doctest: +ELLIPSIS
>>> # do more stuff?

Parse all EGT files in a directory tree

>>> for stream, data in EgtFormat.walkData('tests/egt'):
...     print(stream.name)
tests/egt/test.egt

Create an EGT file from scratch and write to file

>>> data = EgtFormat.Data()
>>> from tempfile import TemporaryFile
>>> stream = TemporaryFile()
>>> data.write(stream)
Classes [hide private]
  EgtFormat
This class implements the EGT format.
Variables [hide private]
  __package__ = 'pyffi.formats.egt'