def load(fd, encoding='<STR_LIT:utf-8>', handler=None, **defaults):
if hasattr(fd, '<STR_LIT>'):<EOL><INDENT>text = fd.read()<EOL><DEDENT>else:<EOL><INDENT>with codecs.open(fd, '<STR_LIT:r>', encoding) as f:<EOL><INDENT>text = f.read()<EOL><DEDENT><DEDENT>handler = handler or detect_format(text, handlers)<EOL>return loads(text, encoding, handler, **defaults)<EOL>
Load and parse a file-like object or filename, 
return a :py:class:`post <frontmatter.Post>`.

::

    >>> post = frontmatter.load('tests/hello-world.markdown')
    >>> with open('tests/hello-world.markdown') as f:
    ...     post = frontmatter.load(f)