[Python-Dev] pydoc script

Paul F. Dubois paul@pfdubois.com
Fri, 20 Apr 2001 11:09:20 -0700


Ka-Ping,
Your pydoc script can fail because the pydoc executed is not the pydoc (and
therefore the python) in the users' current path if they start it explicitly
with a full path. I suggest a similar trick to this one:

#!/bin/csh -f
unsetenv PYTHONHOME
set bindir = `dirname $0`
set path=(${bindir} $path);rehash #in case of respawns, get our python
exec ${bindir}/python -O -c 'import browser;browser.tk_cdat.main()'