From: Serhiy Storchaka Date: Sat, 12 Jan 2013 16:16:18 +0000 (+0200) Subject: Issue #16829: IDLE printing no longer fails if there are spaces or other X-Git-Tag: v3.3.1rc1~371 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=69db587f86cb1a742561c5afebae67b58761420e;p=python Issue #16829: IDLE printing no longer fails if there are spaces or other special characters in the file path. --- 69db587f86cb1a742561c5afebae67b58761420e diff --cc Lib/idlelib/IOBinding.py index ec50eb2348,c4f14efc27..9fe0701133 --- a/Lib/idlelib/IOBinding.py +++ b/Lib/idlelib/IOBinding.py @@@ -1,5 -1,6 +1,6 @@@ import os import types -import pipes ++import shlex import sys import codecs import tempfile @@@ -458,7 -459,7 +459,7 @@@ class IOBinding else: #no printing for this platform printPlatform = False if printPlatform: #we can try to print for this platform - command = command % filename - command = command % pipes.quote(filename) ++ command = command % shlex.quote(filename) pipe = os.popen(command, "r") # things can get ugly on NT if there is no printer available. output = pipe.read().strip() diff --cc Misc/NEWS index d7778179ec,a88c888336..1e4dea2f85 --- a/Misc/NEWS +++ b/Misc/NEWS @@@ -147,8 -199,9 +147,11 @@@ Core and Builtin Library ------- + - Issue #16829: IDLE printing no longer fails if there are spaces or other + special characters in the file path. + +- Issue #16900: Issue a ResourceWarning when an ssl socket is left unclosed. + - Issue #13899: \A, \Z, and \B now correctly match the A, Z, and B literals when used inside character classes (e.g. '[\A]'). Patch by Matthew Barnett.