Connect to Default Printer

Terry Reedy tjreedy at udel.edu
Thu Mar 24 12:01:45 EDT 2016


On 3/23/2016 8:39 PM, Bryon Fawcett wrote:
> Could you please advise me how to connect the python software to my default
> printer.

IDLE prints to default printer with function print_window in 
idlelib/IOBinding.py. The two GetOption calls return these two strings 
(from config-main.def).
For print-command-posix, 'lpr %s'
For print-command-win, 'start /min notepad /p %s'
You should be able to adapt to your needs. Perhaps you do not need the 
messageboxes.
-- 
Terry Jan Reedy


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /