[Python-bugs-list] [ python-Bugs-565373 ] IDLE needs printing

noreply@sourceforge.net noreply@sourceforge.net
Mon, 10 Jun 2002 12:26:20 -0700


Bugs item #565373, was opened at 2002-06-06 11:37
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=565373&group_id=5470

Category: IDLE
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Guido van Rossum (gvanrossum)
Assigned to: Guido van Rossum (gvanrossum)
Summary: IDLE needs printing

Initial Comment:
IDLE really needs a way to print.

It turns out that on Windows, you can print a text file
by invoking notepad /p filename. We can do that using
os.popen() (rather than os.system(), which opens an
ugly DOS box).

On Unix, we can invoke lpr filename in the same way.

So we can make this a standard menu item that takes the
command line to use from the configuration file.  I'll
implement this when I have time (or someone else can
implement it).


----------------------------------------------------------------------

>Comment By: Guido van Rossum (gvanrossum)
Date: 2002-06-10 15:26

Message:
Logged In: YES 
user_id=6380

I've added a simple Print Window command that does this
using Tim's suggestion.

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2002-06-06 11:40

Message:
Logged In: YES 
user_id=6380

According to Mark Hammond, you can also print by copying the
file to the default printer name; if you have win32all,
win32print.GetDefaultPrinter() returns the pathname for the
default printer (e.g. \brat\canon).

Tim Peters notes that you can use "start /min notepad /p
filename" to avoid opening notepad's main window (it still
shows a dialog with a cancel button for a fraction of a
second).

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=565373&group_id=5470