def readme(): try: import pypandoc return pypandoc.convert('README.md', 'rst') except: with open('README.md') as f: return f.read()