[Python-checkins] r65035 - python/trunk/Lib/pydoc.py
georg.brandl
python-checkins at python.org
Wed Jul 16 23:19:28 CEST 2008
Author: georg.brandl
Date: Wed Jul 16 23:19:28 2008
New Revision: 65035
Log:
#3045: fix pydoc behavior for TEMP path with spaces.
Modified:
python/trunk/Lib/pydoc.py
Modified: python/trunk/Lib/pydoc.py
==============================================================================
--- python/trunk/Lib/pydoc.py (original)
+++ python/trunk/Lib/pydoc.py Wed Jul 16 23:19:28 2008
@@ -1333,7 +1333,7 @@
(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 @@
file.write(text)
file.close()
try:
- os.system(cmd + ' ' + filename)
+ os.system(cmd + ' "' + filename + '"')
finally:
os.unlink(filename)
More information about the Python-checkins
mailing list