diff options
author | Georg Brandl <georg@python.org> | 2008-07-16 21:19:28 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-07-16 21:19:28 (GMT) |
commit | b32dea5a3eb0c008d00de3a42b1aa0c05bad2d13 (patch) | |
tree | c3c40fbfd5742ac31a2362b2c2393d0ff5b0b6ca /Lib | |
parent | 0e6ea5d7151957338943896a08627c2f89a00cb0 (diff) | |
download | cpython-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-x | Lib/pydoc.py | 4 |
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) |