docs: def checkmagic(self):
          """Verify that self is a valid CArchive.
  
              Magic signature is at end of the archive."""
          #magic is at EOF; if we're embedded, we need to figure where that is
          if self.len:
              self.lib.seek(self.start+self.len, 0)
          else:
              self.lib.seek(0, 2)
          filelen = self.lib.tell()
          if self.len:
              self.lib.seek(self.start+self.len-self.TRLLEN, 0)
          else:
              self.lib.seek(-self.TRLLEN, 2)
          (magic, totallen, tocpos, toclen, pyvers) = struct.unpack(self.TRLSTRUCT,
                              self.lib.read(self.TRLLEN))
          if magic != self.MAGIC:
              raise RuntimeError("%s is not a valid %s archive file"
                                 % (self.path, self.__class__.__name__))
          self.pkgstart = filelen - totallen
          if self.len:
              if totallen != self.len or self.pkgstart != self.start:
                  raise RuntimeError, "Problem with embedded archive in %s" % self.path
          self.tocpos, self.toclen = tocpos, toclen