summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-07-16 21:19:28 (GMT)
committerGeorg Brandl <georg@python.org>2008-07-16 21:19:28 (GMT)
commitb32dea5a3eb0c008d00de3a42b1aa0c05bad2d13 (patch)
treec3c40fbfd5742ac31a2362b2c2393d0ff5b0b6ca /Lib
parent0e6ea5d7151957338943896a08627c2f89a00cb0 (diff)
downloadcpython-b32dea5a3eb0c008d00de3a42b1aa0c05bad2d13.zip
cpython-b32dea5a3eb0c008d00de3a42b1aa0c05bad2d13.tar.gz
cpython-b32dea5a3eb0c008d00de3a42b1aa0c05bad2d13.tar.bz2
#3045: fix pydoc behavior for TEMP path with spaces.
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/pydoc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index 2035f78..7681a32 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -1333,7 +1333,7 @@ def getpager():
(fd, filename) = tempfile.mkstemp()
os.close(fd)
try:
- if hasattr(os, 'system') and os.system('more %s' % filename) == 0:
+ if hasattr(os, 'system') and os.system('more "%s"' % filename) == 0:
return lambda text: pipepager(text, 'more')
else:
return ttypager
@@ -1361,7 +1361,7 @@ def tempfilepager(text, cmd):
file.write(text)
file.close()
try:
- os.system(cmd + ' ' + filename)
+ os.system(cmd + ' "' + filename + '"')
finally:
os.unlink(filename)