Using RichTextEdit control with pythonwin - seems to fail

Roger Burnham roger.burnham at gte.net
Fri May 21 14:30:40 EDT 1999


On Fri, 21 May 1999 13:48:37 -0400, "Brad Clements" <bkc at Murkworks.com> wrote:

>Being the non-mfc person that I am, I'm trying to find a cheap way to print
>some text to a Windows printer.
>

Brad,

Don't know about the RichEdit (I get the same error), but the simplest way to
print some text is, assuming the text is in a file:

>>> import win32api
>>> win32api.WinExec('notepad /p c:/tmp/sometext.txt')

or, assuming the amount of text is too large for notepad,

>>> win32api.WinExec('wordpad /p c:/tmp/sometext.txt')

Cheers,

Roger Burnham   
Cambridge Research & Instrumentation   
rburnham at cri-inc.com   
http://www.cri-inc.com/   
http://starship.python.net/crew/roger/   
PGP Key: http://www.nai.com/default_pgp.asp   
PGP Fingerprint: 5372 729A 9557 5F36 177F  084A 6C64 BE27 0BC4 CF2D   




More information about the Python-list mailing list