Hi,
Sorry if I'm asking a very stupid question, but I'm a bit stuck on this one. I've recently started to use TextMate for Python (was mainly using it for LaTeX), and I can't take full advantage of the documentation features of the python bundle.
- When selecting the Documentation for Current Word command (Cmd-H), I get a window showing an "Index of Modules". I can reach from there was I was looking for, but I would expect the command to bring directly there. Is this what it is supposed to do, or am I getting the intended behaviour? (Looking at the code, this looks to be a fallback case, so there should be something else happening.)
- When selecting the Documentation in Browser command (Cmd-Shift-H), I get the following error message:
Traceback (most recent call last): File "/Users/xxxx/Library/Application Support/TextMate/Pristine Copy/Bundles/Python.tmbundle/Support/browse_pydocs.py", line 125, in
main() File "/Users/xxxx/Library/Application Support/TextMate/Pristine Copy/Bundles/Python.tmbundle/Support/browse_pydocs.py", line 96, in main wait_for_server(onserve) File "/Users/xxxx/Library/Application Support/TextMate/Pristine Copy/Bundles/Python.tmbundle/Support/browse_pydocs.py", line 78, in wait_for_server raise RuntimeError('timed out waiting for server!') RuntimeError: timed out waiting for server!
Is there any setting I'm missing? From my experience with the LaTeX bundle, there were a few environment variables that had to be set in order to have everything working properly - would there be anything similar I should do here too? Is the bundle maintained at all and supposed to work with my setup (Snow Leopard, python 2.6.1)?
Thanks for your help, and again, apologies if this has been already covered or available on the web, I did my best before sending this.
--enas
On 2011-08-31 09:28, enas wrote:
- When selecting the Documentation for Current Word command (Cmd-H), I get a window showing an "Index of Modules". I can reach from there was I was looking for, but I would expect the command to bring directly there. Is this what it is supposed to do, or am I getting the intended behaviour? (Looking at the code, this looks to be a fallback case, so there should be something else happening.)
You're supposed to get a window titled "DocMate" which has the search results for the highlighted word. It actually has two sets of results. The first is from the online docs at http://docs.python.org/. The second is from locally stored docs, served by Python.tmbundle/Support/DocMate/pydoc_server.py running on port 7427. My guess (and this is just a guess, I haven't looked at the code) is that the reason you're getting the index of modules is because it's unable to get to the online docs and unable to find the current word in the local docs.
- When selecting the Documentation in Browser command (Cmd-Shift-H), I get the following error message:
This starts another local server process, Python.tmbundle/Support/browse_pydocs.py on port 9877, then opens a link in your browser. (Why two different server processes? I don't know.) In your case it sounds like the server process can't start. This one should leave error logs in /tmp/pydoc_server_*.log. With luck there will be something in there that will give you a clue as to what's going on.
Hi Steve,
Thanks for your answers.
On 31 Aug 2011, at 15:30, Steve King wrote:
On 2011-08-31 09:28, enas wrote:
- When selecting the Documentation for Current Word command (Cmd-H), I get a window showing an "Index of Modules". I can reach from there was I was looking for, but I would expect the command to bring directly there. Is this what it is supposed to do, or am I getting the intended behaviour? (Looking at the code, this looks to be a fallback case, so there should be something else happening.)
You're supposed to get a window titled "DocMate" which has the search results for the highlighted word. It actually has two sets of results. The first is from the online docs at http://docs.python.org/. The second is from locally stored docs, served by Python.tmbundle/Support/DocMate/pydoc_server.py running on port 7427. My guess (and this is just a guess, I haven't looked at the code) is that the reason you're getting the index of modules is because it's unable to get to the online docs and unable to find the current word in the local docs.
I've looked deep into the code, and there seems to be a few different places where I'm not getting the excepted behaviour. I didn't link them all to a single cause, so it's hard to troubleshoot, but they all relate to pydoc. Before I go into further details, I should ask, is there anything I have to do to make it work? I have to stress I'm completely ignorant of all that. Did this work out of the box for you?
- When selecting the Documentation in Browser command (Cmd-Shift-H), I get the following error message:
This starts another local server process, Python.tmbundle/Support/browse_pydocs.py on port 9877, then opens a link in your browser. (Why two different server processes? I don't know.) In your case it sounds like the server process can't start. This one should leave error logs in /tmp/pydoc_server_*.log. With luck there will be something in there that will give you a clue as to what's going on.
Unfortunately, the exact same error message appears there too. Not much luck.
--enas