summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-01-12 16:13:24 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-01-12 16:13:24 (GMT)
commit74fe9f307de7557282ed2b01268272efef45a910 (patch)
tree382f67a287579d4bcdc6d818ebdf164698c02902 /Lib
parent53221e371d359c6df410ddd653350dd345ae3be5 (diff)
downloadcpython-74fe9f307de7557282ed2b01268272efef45a910.zip
cpython-74fe9f307de7557282ed2b01268272efef45a910.tar.gz
cpython-74fe9f307de7557282ed2b01268272efef45a910.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.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/idlelib/IOBinding.py b/Lib/idlelib/IOBinding.py
index 9528c9a..c4f14ef 100644
--- a/Lib/idlelib/IOBinding.py
+++ b/Lib/idlelib/IOBinding.py
@@ -1,5 +1,6 @@
import os
import types
+import pipes
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 % pipes.quote(filename)
pipe = os.popen(command, "r")
# things can get ugly on NT if there is no printer available.
output = pipe.read().strip()