While developing my Encounter Builder for D&D I wanted to be able to export its data into a format readable by word processors. After looking at a handful of options I settled on using PyRTF because of the relative simplicity of the Rich Text Format coupled with it having just enough features to make what I wanted to output possible.
Unfortunately PyRTF was rather old and had never been set up to work with Python 3. After looking through the code base I found that aside from a few syntactic updates there were only a handful of pain points that needed adjusting to work in Python 3. Along the way I fixed some bugs in how the code exported non-text data and Unicode, how it handled state management, and refined some page layout functions for my needs.
The result is a version of PyRTF that should run on everything from Python 3.3 onward (verified on Python 3.5+). It implements most of the RTF Version 1.2 spec (i.e., old style table definitions, no arbitrary positioning of objects) with some back-ported updates to support PNG and JPEG image formats and Unicode characters, though anything in the upper Unicode pages like emojis may not be handled correctly. I wouldn't use it for advanced document creation or editing, but if you're looking to create WordPad-style documents with some extra features like tables and page size/layout control then it's a reasonable way to do so.
Since I was only interested in getting PyRTF working in Python 3 I didn't go through the process of making the updated module cross-compatible with Python 2. To avoid clashing with the Python 2 package, I've renamed the Python 3 port PyRTF3 and am making it available to download here under the GNU General Public License for anyone who might be interested in using it in their own projects. Feature and usage documentation is provided via the example Python scripts and the RTF documents created by them.
I recommend either copying the PyRTF3 directory into the source directory of your project or running setup.py using
py -3 setup.py install
from the main directory in the archive. It's not as nice as a proper wheel, but this is how it came originally and I haven't had time to do anything fancier yet.