[TxMt] Re: Python bundle doesn't see modules
Rob McBroom
mailinglist0 at skurfer.com
Mon Jan 3 14:54:29 UTC 2011
On Jan 2, 2011, at 2:17 PM, Allan Odgaard wrote:
> I am not familiar with how the environment can affect Python search paths, only know of the site_customize thing, but perhaps this is key?
The PYTHONPATH environment variable can also affect this, but it will only add to the directories that are already being searched, so something available by default (like the xml module) should still work. I have PYTHONPATH defined in the TextMate preferences, and the example script works for me as well.
One thing that comes to mind: The “Run Script” command in the Python bundle uses some logic to figure out where the `python` executable is. I believe it is completely ignoring `#!/usr/bin/python` on the first line of your script. Could it be finding another copy of Python elsewhere on your system?
I would try “running” each of these from within TextMate (type it on a line and hit ⌃R) and see what you get.
echo $TM_PYTHON
and
which python
--
Rob McBroom
<http://www.skurfer.com/>
More information about the textmate
mailing list