Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Newbie Printing Question

Reply
Thread Tools

Newbie Printing Question

 
 
Richard Lyons
Guest
Posts: n/a
 
      03-28-2005
I'm just starting to work with Python. Have had a little experience
with basic. I am using Python on a Windows XP system.
How to I print a line of output generated in a python script to a
printer attached to the windows computer?
 
Reply With Quote
 
 
 
 
Larry Bates
Guest
Posts: n/a
 
      03-28-2005
If it is a print that can take direct character output (e.g. one
that has PCL or text mode emulation) you can do following:

lpr=open('LPT1','w') # or LPT2, LPT3
lpr.writeline('the output line you want')
lpr.close()

If it is a GDI-only printer it is MUCH more difficult. You need
to interface with Windows GDI. If this is the case, take a look
at wxPython interface to wxWindows (see printPreview) or you can
use Mark Hammonds Windows utilities.

FYI, Larry


Richard Lyons wrote:
> I'm just starting to work with Python. Have had a little experience
> with basic. I am using Python on a Windows XP system.
> How to I print a line of output generated in a python script to a
> printer attached to the windows computer?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 2 11-27-2010 12:12 PM
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 0 08-21-2007 05:52 AM
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 0 08-21-2007 05:50 AM
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 0 08-21-2007 05:28 AM
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 0 08-18-2007 10:11 AM



Advertisments