diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-01-12 16:17:24 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-01-12 16:17:24 (GMT) |
commit | 52f80a704172052f5eca8e84d93500427fc400f2 (patch) | |
tree | 8e3bb23de4d04d3ad657b9a7f64d3ed1b9859a2c /Lib | |
parent | 6c566b3ce9a2c3b27f7f90ec0151d187403ead38 (diff) | |
parent | 69db587f86cb1a742561c5afebae67b58761420e (diff) | |
download | cpython-52f80a704172052f5eca8e84d93500427fc400f2.zip cpython-52f80a704172052f5eca8e84d93500427fc400f2.tar.gz cpython-52f80a704172052f5eca8e84d93500427fc400f2.tar.bz2 |
Issue #16829: IDLE printing no longer fails if there are spaces or other
special characters in the file path.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/idlelib/IOBinding.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/idlelib/IOBinding.py b/Lib/idlelib/IOBinding.py index 9b63928..dda3634 100644 --- a/Lib/idlelib/IOBinding.py +++ b/Lib/idlelib/IOBinding.py @@ -1,5 +1,6 @@ import os import types +import shlex import sys import codecs import tempfile @@ -458,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 % shlex.quote(filename) pipe = os.popen(command, "r") # things can get ugly on NT if there is no printer available. output = pipe.read().strip() |