How to write RTF from Python?

Scott Simmonds simmonds at rlmsystems.com.au
Mon Apr 28 23:27:47 EDT 2003


An option to consider would be to generate an XML file from Python,
then run Jade (the DSSSL processor) on the XML output with RTF as the
output format.
There are a few options for the choice of XML schema, Docbook
certainly has stylesheets that support RTF, and I think TEI do too
(DITA as well ?), or you could roll your own if you want to do battle
with DSSSL :)
This is also a crossplatform approach as jade will run on Unix and
Windows.

Cheers,
Scott.


achrist at easystreet.com wrote in message news:<3EA97D61.3CC9FE74 at easystreet.com>...
> Any suggestions of the shortest path from a Python program to RTF
> output?  RTF seems to be the best (reasonable combination of 
> features and compatability) common denominator for exporting
> data so that (windows) users can bring it into their own word
> processing program, whatever that may be.  (Any problem with
> that?)
> 
> Requirements are about like this:
> 
> 1. Don't need an edit control, just want to write a file, but if
> I have to open an edit window, I can.
> 
> 2. Don't want to do too much fancy.  Text, headings, bulleted
> lists,  maybe some variations in font size.
> 
> 3. Development platform is WinNT, target platform is any reasonably
> recent Windows machine (eg either anything newer than Win95 release 1
> or Win98 or better). 
> 
> TIA,
> 
> 
> Al




More information about the Python-list mailing list