Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #105631

Re: Connect to Default Printer

From Terry Reedy <tjreedy@udel.edu>
Newsgroups comp.lang.python
Subject Re: Connect to Default Printer
Date 2016-03-24 12:01 -0400
Message-ID <mailman.101.1458835321.2244.python-list@python.org> (permalink)
References <CAMwNgK7ietz1oV0wjBXkEtTUuBLEa_MgYaLwgZUXpY04kvK3Lg@mail.gmail.com>

Show all headers | View raw


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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Connect to Default Printer Terry Reedy <tjreedy@udel.edu> - 2016-03-24 12:01 -0400

csiph-web