From b32dea5a3eb0c008d00de3a42b1aa0c05bad2d13 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Wed, 16 Jul 2008 21:19:28 +0000 Subject: [PATCH] #3045: fix pydoc behavior for TEMP path with spaces. --- Lib/pydoc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 2035f7889ee..7681a3206a6 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)