def convert_md_to_rst(md_path, rst_temp_path):
 command = ('pandoc --write=rst --output=%s %s' % (rst_temp_path, md_path))
 print ('converting with pandoc: %s to %s\n-->%s' % (md_path, rst_temp_path, command))
 if os.path.exists(rst_temp_path):
  os.remove(rst_temp_path)
 os.system(command)
 if (not os.path.exists(rst_temp_path)):
  s = ('Error running: %s\n  Did you install pandoc per the %s docstring?' % (command, __file__))
  sys.exit(s)
 return read(rst_temp_path)

def convert_md_to_rst ( md_path , rst_temp_path ) : command = ( 'pandoc --write=rst --output=%s %s' % ( rst_temp_path , md_path ) ) print ( 'converting with pandoc: %s to %s\n-->%s' % ( md_path , rst_temp_path , command ) ) if os . path . exists ( rst_temp_path ) : os . remove ( rst_temp_path ) os . system ( command ) if ( not os . path . exists ( rst_temp_path ) ) : s = ( 'Error running: %s\n  Did you install pandoc per the %s docstring?' % ( command , __file__ ) ) sys . exit ( s ) return read ( rst_temp_path )
convert the contents of a file from markdown to restructuredtext .