|
Panda3D
|
Public Member Functions | |
| def | __init__ |
| def | checkmagic |
| Sub-methods of __init__ - override as needed #############. | |
| def | contents |
| Informational methods. | |
| def | extract |
| Core method - Override as needed #########. | |
| def | loadtoc |
Public Attributes | |
| len | |
| pkgstart | |
| toc | |
| toclen | |
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' |
| def __init__ | ( | self, | |
path = None, |
|||
start = 0, |
|||
len = 0 |
|||
| ) |
| def checkmagic | ( | self | ) |
Sub-methods of __init__ - override as needed #############.
Overridable. Check to see if the file object self.lib actually has a file we understand.
Reimplemented from Archive.
| def contents | ( | self | ) |
Informational methods.
Return a list of the contents Default implementation assumes self.toc is a dict like object. Not required by ArchiveImporter.
Reimplemented from Archive.
| def extract | ( | self, | |
| name | |||
| ) |
Core method - Override as needed #########.
Get the object corresponding to name, or None.
For use with imputil ArchiveImporter, object is a python code object.
'name' is the name as specified in an 'import name'.
'import a.b' will become:
extract('a') (return None because 'a' is not a code object)
extract('a.__init__') (return a code object)
extract('a.b') (return a code object)
Default implementation:
self.toc is a dict
self.toc[name] is pos
self.lib has the code object marshal-ed at pos
Reimplemented from Archive.
| def loadtoc | ( | self | ) |
Overridable. Default: After magic comes an int (4 byte native) giving the position of the TOC within self.lib. Default: The TOC is a marshal-able string.
Reimplemented from Archive.
int LEVEL = 9 [static] |
string TRLSTRUCT = '8siii' [static] |
1.7.3