Panda3D
|
Public Member Functions | |
def | __init__ |
def | add |
def | checkmagic |
def | contents |
def | extract |
def | loadtoc |
def | openEmbedded |
def | save_toc |
def | save_trailer |
Public Attributes | |
len | |
pkgstart | |
toc | |
toclen | |
tocpos | |
Static Public Attributes | |
int | HDRLEN = 0 |
int | LEVEL = 9 |
string | MAGIC = 'MEI\014\013\012\013\015' |
TOCTMPLT = CTOC | |
int | TRLLEN = 20 |
string | TRLSTRUCT = '8siii' |
An Archive subclass that an hold arbitrary data. Easily handled from C or from Python.
def __init__ | ( | self, | |
path = None , |
|||
start = 0 , |
|||
len = 0 |
|||
) |
Constructor. PATH is path name of file (create an empty CArchive if path is None). START is the seekposition within PATH. LEN is the length of the CArchive (if 0, then read till EOF).
def add | ( | self, | |
entry | |||
) |
Add an ENTRY to the CArchive. ENTRY must have: entry[0] is name (under which it will be saved). entry[1] is fullpathname of the file. entry[2] is a flag for it's storage format (0==uncompressed, 1==compressed, 2==Python source format) entry[3] is the entry's type code.
Reimplemented from Archive.
def checkmagic | ( | self | ) |
Verify that self is a valid CArchive. Magic signature is at end of the archive.
Reimplemented from Archive.
def contents | ( | self | ) |
Return the names of the entries
Reimplemented from Archive.
def extract | ( | self, | |
name | |||
) |
Get the contents of an entry. NAME is an entry name. Return the tuple (ispkg, contents). For non-Python resoures, ispkg is meaningless (and 0). Used by the import mechanism.
Reimplemented from Archive.
def loadtoc | ( | self | ) |
Load the table of contents into memory.
Reimplemented from Archive.
def openEmbedded | ( | self, | |
name | |||
) |
Open a CArchive of name NAME embedded within this CArchive.
def save_toc | ( | self, | |
tocpos | |||
) |
Save the table of contents to disk.
Reimplemented from Archive.
def save_trailer | ( | self, | |
tocpos | |||
) |
Save the trailer to disk. CArchives can be opened from the end - the trailer points back to the start.
Reimplemented from Archive.
int LEVEL = 9 [static] |
string TRLSTRUCT = '8siii' [static] |