How do I specify color for output file in python
<p>I am trying to change the color of certain lines when creating a file in python. For example if I want all lines with A to be green and the rest default.  </p>

<pre><code>logfile = open("dirpath/file",'w')
logfile.write("A\n")
logfile.write("B\n")
logfile.close()
</code></pre>

<p>Its on Linux by the way</p>
