[SVN] r6343 (Python)

Alexander John Ross alex.j.ross at gmail.com
Tue Dec 12 21:33:37 UTC 2006


More work on the "Documentation for Current Word" command.

• Command now launches pydoc server on a timer.  Pydoc will shutdown 5 minutes
  after the last use. (If this is not long enough, we can change it.)
• Added a new function `env_python` to tm_helpers.  It returns a path a python
  executable, and the version number of that executable from the environment.
  The function first tries to parse the environment variable TM_FIRST_LINE for a
  #!, then looks in TM_PYTHON, and defaults to "/usr/bin/env python" last.
  (Note: TM_FIRST_LINE is a nonstandard dynamic variable. Look at the
  "Documentation for Current Word" command for an example of how to set it up.)
• docmate uses the aforementioned env_python function to determine which pydoc
  to launch.  This means you get different versions of pydoc just by changing
  the #! of your script!

Changed:
U   trunk/Bundles/Python.tmbundle/Commands/Documentation for Current Word.tmCommand
U   trunk/Bundles/Python.tmbundle/Support/DocMate/docmate.py
A   trunk/Bundles/Python.tmbundle/Support/DocMate/pydoc_server.py
U   trunk/Support/lib/tm_helpers.py



More information about the textmate-dev mailing list