def rst2md(text):
    'Use Pandoc to convert text from ReST to Markdown.\n    '
    pandoc = subprocess.Popen(['pandoc', '--from=rst', '--to=markdown', '--wrap=none'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    (stdout, _) = pandoc.communicate(text.encode('utf-8'))
    md = stdout.decode('utf-8').strip()
    return re.sub('^-   ', '- ', md, flags=re.M)
Use Pandoc to convert text from ReST to Markdown.
def rst2md(text):
    '\n    '
    pandoc = subprocess.Popen(['pandoc', '--from=rst', '--to=markdown', '--wrap=none'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    (stdout, _) = pandoc.communicate(text.encode('utf-8'))
    md = stdout.decode('utf-8').strip()
    return re.sub('^-   ', '- ', md, flags=re.M)