code: def open(fn, expand_includes=True, include_comments=False, include_position=False, **kwargs):
      
      p = Parser(expand_includes=expand_includes,
                 include_comments=include_comments, **kwargs)
      ast = p.parse_file(fn)
      m = MapfileToDict(include_position=include_position,
                        include_comments=include_comments, **kwargs)
      d = m.transform(ast)
      return d
docs: Load a Mapfile from the supplied filename into a Python dictionary.
  
      Parameters
      ----------
  
      fn: string
          The path to the Mapfile, or partial Mapfile
      expand_includes: boolean
          Load any ``INCLUDE`` files in the MapFile
      include_comments: boolean
           Include or discard comment strings from the Mapfile - *experimental*
      include_position: boolean
           Include the position of the Mapfile tokens in the output
  
      Returns
      -------
  
      dict
          A Python dictionary representing the Mapfile in the mappyfile format
  
      Example
      -------
  
      To open a Mapfile from a filename and return it as a dictionary object::
  
          d = mappyfile.open('mymap.map')
  
      Notes
      -----
  
      Partial Mapfiles can also be opened, for example a file containing a ``LAYER`` object.