This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author peta
Recipients peta
Date 2008-06-06.03:10:26
SpamBayes Score 0.084141426
Marked as misclassified No
Message-id <1212721889.56.0.323857297959.issue3045@psf.upfronthosting.co.za>
In-reply-to
Content
If the environ vars TEMP or TMP contain spaces on w32 the on-line help
will not work.  e.g. help('or') gives the message

    The system cannot find the file specified.

This is because pydoc.tempfilepager sets filename=tempfile.mktemp()
which will have spaces in it if TEMP does.  The filename is then used to
constuct the system command:

     os.system(cmd + ' ' + filename)

which in windows ends up as  os.system('more < FILE WITH SPACES').  The
filename should be quoted, e.g.

     os.system('%s "%s"' % (cmd,filename))

I only ran across this problem because I use uwin on windows and it sets
TEMP to a w32 style long path.  The normal windows command shell uses
the dos spaceless sort form for the TMP and TEMP env vars so the problem
doesn't arise when python is invoked from there.

And isn't tempfile.mktemp() deprecated?
History
Date User Action Args
2008-06-06 03:11:30petasetspambayes_score: 0.0841414 -> 0.084141426
recipients: + peta
2008-06-06 03:11:29petasetspambayes_score: 0.0841414 -> 0.0841414
messageid: <1212721889.56.0.323857297959.issue3045@psf.upfronthosting.co.za>
2008-06-06 03:10:28petalinkissue3045 messages
2008-06-06 03:10:26petacreate