def read_md(path): try: import pypandoc return pypandoc.convert(path, 'rst') except ImportError: return open(path).read()