title: Is there a way to write formatted text from Python?
body: <p>If you are writing to a file with python, is there any way to make certain parts of the text bold, italic, or underlined ?</p>
  
  <p>i tried:</p>
  
  <pre><code>test = '/location/tester.rtf'
  out_file = open(test,'w')
  out_file.write('is this {\bold}?')
  out_file.close() #thanks to the comment below
  </code></pre>
  
  <p>is it possible to write FORMATTED TEXT like bold, italic, or underlined text via python ? i feel like .rtf is the most basic formatted text but correct me if i'm wrong</p>