Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

print some text

1 view
Skip to first unread message

barronmo

unread,
Apr 23, 2008, 3:05:22 PM4/23/08
to
I'm a beginner searching for an easy way to print the contents of a
text control. So far I've come up with the following(difficulties):

1) using wxPython
-convert to HTML and then print (I don't know anything about
HTML)
-use wx.Printout (Seems complicated; may be beyond my abilities)

2) create a text file and then print it out (can create but can only
print with the win32api.ShellExecute method so this solution doesn't
help me on my Linus laptop)

3) use ReportLab to create .pdf and then print that out (again, can
create but can't print in Linux)

Thanks for any help.

Mike

casti...@gmail.com

unread,
Apr 23, 2008, 4:27:54 PM4/23/08
to

Write out an HTML file, write back if you need a quick one, then print
that with a browser.

Gabriel Ibanez

unread,
Apr 25, 2008, 2:44:22 PM4/25/08
to pytho...@python.org
Hi !

Other idea (old style school):

def printing():
f=open("lpt1", "w")
f.write("\nSomething to print\f")
f.close()

Cheers..

- Ibanez -

--
http://mail.python.org/mailman/listinfo/python-list

barronmo

unread,
Apr 27, 2008, 10:35:48 AM4/27/08
to
On Apr 25, 2:44 pm, "Gabriel Ibanez" <mob...@ibinsa.com> wrote:
> Hi !
>
> Other idea (old style school):
>
> def printing():
> f=open("lpt1", "w")
> f.write("\nSomething to print\f")
> f.close()
>
> Cheers..
>
> - Ibanez -
>

I haven't found a way from within python to print f. I'm sure there
it is something simple but I've been searching for a couple weeks now
with no luck.

Mike

Bjoern Schliessmann

unread,
Apr 27, 2008, 5:42:44 PM4/27/08
to
barronmo wrote:

> I haven't found a way from within python to print f. I'm sure
> there it is something simple but I've been searching for a couple
> weeks now with no luck.

Tried some searching?

http://wiki.wxpython.org/Printing

HTH&Regards,


Björn
--
BOFH excuse #374:

It's the InterNIC's fault.

0 new messages