def readme(fname):
    """Reads a markdown file and returns the contents formatted as rst"""
    md = open(os.path.join(os.path.dirname(__file__), fname)).read()
    output = md
    try:
        import pypandoc
        output = pypandoc.convert(md, 'rst', format='md')
    except ImportError:
        pass
    return output
Reads a markdown file and returns the contents formatted as rst