code: def saveShp(self, target):
          
          if not hasattr(target, "write"):
              target = os.path.splitext(target)[0] + '.shp'
          if not self.shapeType:
              self.shapeType = self._shapes[0].shapeType
          self.shp = self.__getFileObj(target)
          self.__shapefileHeader(self.shp, headerType='shp')
          self.__shpRecords()
docs: Save an shp file.