Re: System printer object

2019-01-07 Thread Terry Reedy

On 1/7/2019 5:17 PM, Dave wrote:
I need to print to one or both of my system printers.  I have not found 
a printer object in Python or in Tkinter.  This needs to work with 
Linux, Window, and Mac.  Can someone point me in the right direction? 
Ultimately, I want to have a File/Print in the menu that lets me select 
the printer and properties.


IDLE can print editor contents to the default printer.  The code is in 
idlelib.iomenu.  The subprocess commands used are


print-command-posix=lpr %%s
print-command-win=start /min notepad /p %%s

I believe %%s becomes the name of the saved file.



--
Terry Jan Reedy


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


Re: System printer object

2019-01-07 Thread Calvin Spealman
Neither Python nor Tkinter include interface libraries to talk to hardware
printers out of the box, but a number of libraries and methods exist
depending on your platform. Both Wx and Qt, UI toolkits with great Python
bindings, do support printers to one degree or another, although I don't
know how difficult these are to work with. Either may offer good options,
or at least a starting point, if you look at the wxPython and/or PyQt
libraries.

On Mon, Jan 7, 2019 at 5:20 PM Dave  wrote:

> I need to print to one or both of my system printers.  I have not found
> a printer object in Python or in Tkinter.  This needs to work with
> Linux, Window, and Mac.  Can someone point me in the right direction?
> Ultimately, I want to have a File/Print in the menu that lets me select
> the printer and properties.
>
> Thanks,
> Dave
> --
> https://mail.python.org/mailman/listinfo/python-list
>


-- 

CALVIN SPEALMAN

SENIOR QUALITY ENGINEER

cspea...@redhat.com  M: +1.336.210.5107

TRIED. TESTED. TRUSTED. 
-- 
https://mail.python.org/mailman/listinfo/python-list


System printer object

2019-01-07 Thread Dave
I need to print to one or both of my system printers.  I have not found 
a printer object in Python or in Tkinter.  This needs to work with 
Linux, Window, and Mac.  Can someone point me in the right direction? 
Ultimately, I want to have a File/Print in the menu that lets me select 
the printer and properties.


Thanks,
Dave
--
https://mail.python.org/mailman/listinfo/python-list