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