You can use the getTxtFromRtf
function to convert a string from Rich Text Format (RTF) to the standard text format. This function is part of the RTFtoTXT
module, which is included with Chameleon.
Here is an example of code that calls getTxtFromRtf:
from RTFtoTXT import getTxtFromRtf
rtfstr = r'''
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset0 Arial;}}
\viewkind4\uc1\pard\f0\fs20 example text}'''
textstr = getTxtFromRtf(rtfstr)
print textstr