code: def __getFileObj(self, f):
          
          if not f:
              raise ShapefileException("Shapefile Reader requires a shapefile or file-like object.")
          if self.shp and self.shpLength is None:
              self.load()
          if self.dbf and len(self.fields) == 0:
              self.load()
          return f
docs: Checks to see if the requested shapefile file object is
          available. If not a ShapefileException is raised.