def convert(markdown_path):
    """Convert a Markdown file to a reStructuredText file with the pypandoc"""
    try:
        import pypandoc
        output = pypandoc.convert(markdown_path, 'rst')
    except (IOError, ImportError):
        output = open(markdown_path).read()
    return output
