- Leopard's default Python 2.5.1 is in /usr/bin.
- Python 2.6.1 from python.org is installed at /Library/Frameworks/
Python.framework/Versions/2.6/bin/python with a symbolic link to /usr/
local/bin (which is recommended in the BBEdit User Manual, page 328).
- My PATH is set to use Python 2.6.1.
- I have Python documentation installed at ~/Documents/python-2.6.2-
docs-html (the most recent 2.x version available)
- The PYTHONDOCS variable in my environment.plist is set to ~/
Documentation/python-2.6.2-docs-html (per page 328 of the BBEdit User
Manual)
If I run "pydoc print" (using 2.6.1) from Terminal, I get the expected
help output on the print statement; everything looks good. It seems
the MacPython 2.6.1 distribution also installs its own copy of the
keyword documentation because this works even without the PYTHONDOCS
variable in my environment.plist and Python docs in my ~/Documents
folder.
But when I use BBEdit's Find in Reference command on the "print"
keyword, I get the following error:
> Sorry, topic and keyword documentation is not available because the
> Python
> HTML documentation files could not be found. If you have installed
> them,
> please set the environment variable PYTHONDOCS to indicate their
> location.
Why can't BBEdit's pydoc lookup find the keyword documentation?
Shouldn't it use the 2.6.1 version in my PATH? That seems to work fine
from Terminal.
Also, I noticed that with my shebang statement set to "#!/usr/local/
bin/python", a call to "print sys.version" returns 2.6.1. But with my
shebang statement set to "#!/usr/bin/env python", the same call to
"print sys.version" returns 2.5.1. Shouldn't they both return 2.6.1?
Any help would be greatly appreciated!
-Dennis
>I'm having some trouble configuring BBEdit's Find in Reference command
>to work with Python keywords. Here's my set up:
[...]
>- My PATH is set to use Python 2.6.1.
>
>- I have Python documentation installed at ~/Documents/python-2.6.2-
>docs-html (the most recent 2.x version available)
>
>- The PYTHONDOCS variable in my environment.plist is set to ~/
>Documentation/python-2.6.2-docs-html (per page 328 of the BBEdit User
>Manual)
>
[...]
>Why can't BBEdit's pydoc lookup find the keyword documentation?
>Shouldn't it use the 2.6.1 version in my PATH? That seems to work fine
>from Terminal.
[...]
There are two issues involved here.
First, since as Steve mentioned a few days back,
<http://groups.google.com/group/bbedit/msg/570aba4f611aed2f>
the GUI environment does not inherit from the command line environment,
you'll also need to supply a suitable PATH in your environment.plist.
By way of example, here's mine:
<key>PATH</key>
<string>/Users/pwoolsey/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin</string>
Second, please note that changes in your environment.plist don't take
effect until you relog.
Regards,
Patrick Woolsey
==
Bare Bones Software, Inc. <http://www.barebones.com>
P.O. Box 1048, Bedford, MA 01730-1048
That did the trick. Thanks!
-Dennis