[Tutor] printing in python 3.x

Alan Gauld alan.gauld at btinternet.com
Fri Dec 3 09:13:43 CET 2010


"Rance Hall" <ranceh at gmail.com> wrote

>
> But shop owner wants to do something nicer with the customer 
> receipts.
> He is talking shop logos and pdf files.

The simplest technique is probably to generate an HTML file and then
get the OS to print that for you via the default browser.

> Google keeps bringing up ReportLib and the python imaging library, 
> but
> neither have a 3.x compatible version yet.

THats much harder work IMHO than using an HTML file as a template.

> Shop owner is talking about eventually being able to save customer
> check in tickets and check out tickets on a web site where clients 
> can
> log in and check on their work.

And HTML woyuld definitely be easier here!

> My thought is that this is perfect for PDF files, but they aren't
> available on 3.x yet.

Well you could hand crank them, they are just text files after all.
But HTML is much easier to generate by hand!

> I looked at word integration and openoffice integration and they 
> dont
> look ready for 3.x yet either.

The Pywin32 and ctypes modules all work on Python 3 so you
could use COM integration, or even WSH. But HTML stioll gets
my vote.

HTH,


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/




More information about the Tutor mailing list