original_docstring: Opens a shapefile from a filename or file-like
          object. Normally this method would be called by the
          constructor with the file name as an argument.
docstring: Opens a shapefile from a filename or file-like
  object. Normally this method would be called by the
  constructor with the file name as an argument.
docstring_tokens: Opens a shapefile from a filename or file - like object . Normally this method would be called by the constructor with the file name as an argument .
code: def load(self, shapefile=None):
          """Opens a shapefile from a filename or file-like
          object. Normally this method would be called by the
          constructor with the file name as an argument."""
          if shapefile:
              (shapeName, ext) = os.path.splitext(shapefile)
              self.shapeName = shapeName
              self.load_shp(shapeName)
              self.load_shx(shapeName)
              self.load_dbf(shapeName)
              if not (self.shp or self.dbf):
                  raise ShapefileException("Unable to open %s.dbf or %s.shp." % (shapeName, shapeName))
          if self.shp:
              self.__shpHeader()
          if self.dbf:
              self.__dbfHeader()
code_tokens: def load ( self , shapefile = None ) : if shapefile : ( shapeName , ext ) = os . path . splitext ( shapefile ) self . shapeName = shapeName self . load_shp ( shapeName ) self . load_shx ( shapeName ) self . load_dbf ( shapeName ) if not ( self . shp or self . dbf ) : raise ShapefileException ( "Unable to open %s.dbf or %s.shp." % ( shapeName , shapeName ) ) if self . shp : self . __shpHeader ( ) if self . dbf : self . __dbfHeader ( )
short_docstring: Opens a shapefile from a filename or file-like
  object.
short_docstring_tokens: Opens a shapefile from a filename or file - like object .
comment: """Opens a shapefile from a filename or file-like
          object. Normally this method would be called by the
          constructor with the file name as an argument."""