title: How to create / edit / convert to an .rtf file with Python?
body: <p>For creating / editing, I have tried,</p>
  
  <pre><code>with open(myfile.rtf, 'a') as file:
      file.write("{\rtf1\ansi{\fonttbl\f0\fswiss Helvetica;}\f0\pard")
      file.write(my_String_here)
      file.write("\par}")
  </code></pre>
  
  <p>Unfortunately the file it creates isn't an rtf file.</p>
  
  <p>I can create a simple .txt file using</p>
  
  <pre><code>with open(myfile.txt, 'a') as file:
      file.write(my_String_here)
  </code></pre>
  
  <p>Alternatively, Is there an easy way to convert a .txt to an .rtf? </p>