Printing in a generic way - like the rest of Python

John Hall wweexxsseessssaa at telusplanet.net
Mon May 12 10:13:13 EDT 2003


On Mon, 12 May 2003 06:47:52 GMT, "Ed Connell"
<connell at noflashspam.net> wrote:

>How can I print a file in a generic way in both Widows and Linux?  I've
>searched for the answer but have not found it.

I assume you mean something more than basic ASCII text?

I'm thinking of building an *.rtf file, which _IS_ plain text but
displays/prints fancy fonts, colours, graphics etc in an RTF "reader",
e.g. MS Windows WordPad. If I do this, I'll create a file in WordPad
with keywords where I want my text, then replace those with real text
in my Python code. There are RTF 'readers' available for Linux etc,
and the RTF spec (which, unlike their Word/Office formats, has not
changed significantly in many years) is freely available from one of
the Microsoft web sites.

Also see this:
http://www-106.ibm.com/developerworks/linux/library/l-sc9/

There are packages with which you can create PDF docs within Python
also - see ReportLab (sorry, can't find the link just now)

Be careful to search for "rtf" (rich text format), 
NOT "rft" which was IBM's "Revisable Form Text" which had similar aims
and uses but IIRC has been obsolete for years.
-- 
John W Hall <wweexxsseessssaa at telusplanet.net>
Calgary, Alberta, Canada.
"Helping People Prosper in the Information Age"




More information about the Python-list mailing list