Seems to work using 2.7 but not 3.2. On 3.2 it just closes all my python sessions. Is this a bug? Can someone point me to a "How To" on using a local printer in windows?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110606/70fb4841/attachment.html>

Search Discussions

  • Gabriel Genellina at Jun 7, 2011 at 6:22 am
    En Mon, 06 Jun 2011 14:48:26 -0300, Steve Oldner <Steven.Oldner at la.gov>
    Seems to work using 2.7 but not 3.2. On 3.2 it just closes all my
    python sessions. Is this a bug? Can someone point me to a "How To" on
    using a local printer in windows?
    It's a bug. Starting IDLE from the command line, one can actually see the

    Exception in Tkinter callback
    Traceback (most recent call last):
    File "D:\apps\python32\lib\tkinter\__init__.py", line 1399, in __call__
    return self.func(*args)
    File "D:\apps\python32\lib\idlelib\IOBinding.py", line 453, in
    command = idleConf.GetOption('main','General','print-command-win')
    File "D:\apps\python32\lib\idlelib\configHandler.py", line 245, in
    type=type, raw=raw)
    File "D:\apps\python32\lib\idlelib\configHandler.py", line 54, in Get
    return self.get(section, option, raw=raw)
    File "D:\apps\python32\lib\configparser.py", line 789, in get
    File "D:\apps\python32\lib\configparser.py", line 391, in before_get
    self._interpolate_some(parser, option, L, value, section, defaults, 1)
    File "D:\apps\python32\lib\configparser.py", line 440, in
    "found: %r" % (rest,))
    configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(',
    : '%s'

    IDLE is attempting to read an entry from its configuration file, but fails
    because of a syntax error in the file (it's an error for a ConfigParser
    entry, %s should be %%s). The same entry was fine for earlier IDLE
    versions. As a workaround, you may edit the offending lines in your
    configuration file.

    Go to the idlelib directory; if you don't know where it is, just open idle
    or Python command line and execute:

    py> import idlelib
    py> idlelib.__file__

    In the same directory you'll find config-main.def; open it, and replace
    these lines in the [General] section:

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

    (%s should become %%s). Tested on Windows, but Linux should have the same
    problem and temporary solution. You may need to roll this change back when
    the code is corrected.

    Reported as http://bugs.python.org/issue12274

    Gabriel Genellina
  • Steve Oldner at Jun 7, 2011 at 12:08 pm
    Thanks Gabriel!

    Do you know where any documentation is on printing to a local printer for 3.2? I've found Hammond's and Golden's info for win32, but haven't seen if it works for 3.2.

    Again thank you for your reply and submitting the bug.


    Steve Oldner

    -----Original Message-----
    From: python-list-bounces+steven.oldner=la.gov at python.org [mailto:python-list-bounces+steven.oldner=la.gov at python.org] On Behalf Of python-list-request at python.org
    Sent: Tuesday, June 07, 2011 5:00 AM
    To: python-list at python.org
    Subject: Python-list Digest, Vol 93, Issue 43

    Send Python-list mailing list submissions to
    python-list at python.org

    To subscribe or unsubscribe via the World Wide Web, visit
    or, via email, send a message with subject or body 'help' to
    python-list-request at python.org

    You can reach the person managing the list at
    python-list-owner at python.org

    When replying, please edit your Subject line so it is more specific than "Re: Contents of Python-list digest..."

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
postedJun 6, '11 at 5:48p
activeJun 7, '11 at 12:08p

2 users in discussion

Steve Oldner: 2 posts Gabriel Genellina: 1 post



site design / logo © 2022 Grokbase