summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-01-12 16:12:27 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-01-12 16:12:27 (GMT)
commiteebcb5f7901171b505c7b039a3d5b874c7d72808 (patch)
tree0e966389be4f7fc818b4854217e29212a050b6a7 /Lib/idlelib
parentef2bd67e2364ef92dab03442c07864a3a5e90b85 (diff)
downloadcpython-eebcb5f7901171b505c7b039a3d5b874c7d72808.zip
cpython-eebcb5f7901171b505c7b039a3d5b874c7d72808.tar.gz
cpython-eebcb5f7901171b505c7b039a3d5b874c7d72808.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/idlelib')
-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 e429c10..8078c3f 100644
--- a/Lib/idlelib/IOBinding.py
+++ b/Lib/idlelib/IOBinding.py
@@ -7,6 +7,7 @@
import os
import types
+import pipes
import sys
import codecs
import tempfile
@@ -503,7 +504,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()