Commits

Georg Brandl  committed ebe9323

#3045: fix pydoc behavior for TEMP path with spaces.

  • Participants
  • Parent commits ec85b58
  • Branches legacy-trunk

Comments (0)

Files changed (1)

File Lib/pydoc.py

     (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
     file.write(text)
     file.close()
     try:
-        os.system(cmd + ' ' + filename)
+        os.system(cmd + ' "' + filename + '"')
     finally:
         os.unlink(filename)