code: def __shpHeader(self):
          
          if not self.shp:
              raise ShapefileException("Shapefile Reader requires a shapefile or file-like object. (no shp file found")
          shp = self.shp
          # File length (16-bit word * 2 = bytes)
          shp.seek(24)
          self.shpLength = unpack(">i", shp.read(4))[0] * 2
          # Shape type
          shp.seek(32)
          self.shapeType= unpack("<i", shp.read(4))[0]
          # The shapefile's bounding box (lower left, upper right)
          self.bbox = _Array('d', unpack("<4d", shp.read(32)))
          # Elevation
          self.zbox = _Array('d', unpack("<2d", shp.read(16)))
          # Measure
          self.mbox = []
          for m in _Array('d', unpack("<2d", shp.read(16))):
              # Measure values less than -10e38 are nodata values according to the spec
              if m > NODATA:
                  self.mbox.append(m)
              else:
                  self.mbox.append(None)
docs: Reads the header information from a .shp or .shx file.