Hi Foks,
Not sure if this goes to you all or not but Pymate is using the wrong version of python when it runs my script. Basically I have a script which looks like this
#!/usr/bin/env python print "Hi"
It fires python version 2.3.5.
If I open a shell and type /usr/bin/env python it brings up the version I want. I have set TM_PYTHON to point to the version I want but still no luck. Any ideas?
---
Steven M. Klass
Strategic Manager, Design Automation - Analog Mixed Signal
SMSC 3930 East Ray Road, Suite 200 Phoenix, Arizona 85044 (480) 704-7046 (Desk) (480) 225-1112 (Mobile) steven.klass@smsc.com
from the looks of PyMate, your script's hash bang will override $TM_PYTHON (not sure if this is correct behavior) so all I can think is that there is a path issue in TextMate that you're not seeing in your shell. I did a quick test : /usr/bin/env python -V executed from my TextMate shows my expected python version.
On 3/12/07, Steven.Klass@smsc.com Steven.Klass@smsc.com wrote:
Hi Foks,
Not sure if this goes to you all or not but Pymate is using the
wrong version of python when it runs my script. Basically I have a script which looks like this
#!/usr/bin/env python print "Hi"
It fires python version 2.3.5.
If I open a shell and type /usr/bin/env python it brings up the version I want. I have set TM_PYTHON to point to the version I want but still no luck. Any ideas?
Steven M. Klass
Strategic Manager, Design Automation - Analog Mixed Signal
SMSC 3930 East Ray Road, Suite 200 Phoenix, Arizona 85044 (480) 704-7046 (Desk) (480) 225-1112 (Mobile) steven.klass@smsc.com
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Hi Kumar,
This is apparently what is happening - worse it seems to be ignoring my environment all together and overiding it with the defaults. If I hard code in the python path I want it to use it works but this is (obviously) undesired. It appears that in pymate.rb the executable is getting incorrectly (IMHO) defined.
def executable; @hashbang || ENV['TM_PYTHON'] || 'python' end
shouldn't this be
def executable; ENV['TM_PYTHON'] || @hashbang || 'python' end
So you can overide the variable?
---
Steven M. Klass
Strategic Manager, Design Automation - Analog Mixed Signal
SMSC 3930 East Ray Road, Suite 200 Phoenix, Arizona 85044 (480) 704-7046 (Desk) (480) 225-1112 (Mobile) steven.klass@smsc.com
"Kumar McMillan" kumar.mcmillan@gmail.com Sent by: textmate-bounces@lists.macromates.com 03/12/07 02:51 PM Please respond to TextMate users textmate@lists.macromates.com
To "TextMate users" textmate@lists.macromates.com cc
Subject Re: [TxMt] Pymate using the wrong version of python..
from the looks of PyMate, your script's hash bang will override $TM_PYTHON (not sure if this is correct behavior) so all I can think is that there is a path issue in TextMate that you're not seeing in your shell. I did a quick test : /usr/bin/env python -V executed from my TextMate shows my expected python version.
On 3/12/07, Steven.Klass@smsc.com Steven.Klass@smsc.com wrote:
Hi Foks,
Not sure if this goes to you all or not but Pymate is using the
wrong version of python when it runs my script. Basically I have a
script
which looks like this
#!/usr/bin/env python print "Hi"
It fires python version 2.3.5.
If I open a shell and type /usr/bin/env python it brings up the version
I
want. I have set TM_PYTHON to point to the version I want but still no luck.
Any
ideas?
Steven M. Klass
Strategic Manager, Design Automation - Analog Mixed Signal
SMSC 3930 East Ray Road, Suite 200 Phoenix, Arizona 85044 (480) 704-7046 (Desk) (480) 225-1112 (Mobile) steven.klass@smsc.com
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
______________________________________________________________________ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Steven,
Except that you might write a script specifically for python 2.3, in which case you might add a hash-bang specifically calling that interpreter. In this case, you wouldn't want TM_PYTHON to override the hash-bang.
To understand why /usr/bin/env python doesn't find python2.5, see here: http://macromates.com/textmate/manual/shell_commands
That should solve the problem.
–Alex
On Mar 12, 2007, at 3:16 PM, Steven.Klass@smsc.com wrote:
Hi Kumar,
This is apparently what is happening - worse it seems to be
ignoring my environment all together and overiding it with the defaults. If I hard code in the python path I want it to use it works but this is (obviously) undesired. It appears that in pymate.rb the executable is getting incorrectly (IMHO) defined.
def executable; @hashbang || ENV['TM_PYTHON'] || 'python' end
shouldn't this be
def executable; ENV['TM_PYTHON'] || @hashbang || 'python' end
So you can overide the variable?
Steven M. Klass
Strategic Manager, Design Automation - Analog Mixed Signal
SMSC 3930 East Ray Road, Suite 200 Phoenix, Arizona 85044 (480) 704-7046 (Desk) (480) 225-1112 (Mobile) steven.klass@smsc.com
"Kumar McMillan" kumar.mcmillan@gmail.com Sent by: textmate-bounces@lists.macromates.com 03/12/07 02:51 PM Please respond to TextMate users textmate@lists.macromates.com
To "TextMate users" textmate@lists.macromates.com cc Subject Re: [TxMt] Pymate using the wrong version of python..
from the looks of PyMate, your script's hash bang will override $TM_PYTHON (not sure if this is correct behavior) so all I can think is that there is a path issue in TextMate that you're not seeing in your shell. I did a quick test : /usr/bin/env python -V executed from my TextMate shows my expected python version.
On 3/12/07, Steven.Klass@smsc.com Steven.Klass@smsc.com wrote:
Hi Foks,
Not sure if this goes to you all or not but Pymate is
using the
wrong version of python when it runs my script. Basically I have
a script
which looks like this
#!/usr/bin/env python print "Hi"
It fires python version 2.3.5.
If I open a shell and type /usr/bin/env python it brings up the
version I
want. I have set TM_PYTHON to point to the version I want but still no
luck. Any
ideas?
Steven M. Klass
Strategic Manager, Design Automation - Analog Mixed Signal
SMSC 3930 East Ray Road, Suite 200 Phoenix, Arizona 85044 (480) 704-7046 (Desk) (480) 225-1112 (Mobile) steven.klass@smsc.com
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you
don't)
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
You rock!
Thanks so much.
---
Steven M. Klass
Strategic Manager, Design Automation - Analog Mixed Signal
SMSC 3930 East Ray Road, Suite 200 Phoenix, Arizona 85044 (480) 704-7046 (Desk) (480) 225-1112 (Mobile) steven.klass@smsc.com
Alexander Ross alex.j.ross@gmail.com Sent by: textmate-bounces@lists.macromates.com 03/12/07 03:41 PM Please respond to TextMate users textmate@lists.macromates.com
To TextMate users textmate@lists.macromates.com cc
Subject Re: [TxMt] Pymate using the wrong version of python..
Steven,
Except that you might write a script specifically for python 2.3, in which case you might add a hash-bang specifically calling that interpreter. In this case, you wouldn't want TM_PYTHON to override the hash-bang.
To understand why /usr/bin/env python doesn't find python2.5, see here: http://macromates.com/textmate/manual/shell_commands
That should solve the problem.
–Alex
On Mar 12, 2007, at 3:16 PM, Steven.Klass@smsc.com wrote:
Hi Kumar,
This is apparently what is happening - worse it seems to be ignoring my environment all together and overiding it with the defaults. If I hard code in the python path I want it to use it works but this is (obviously) undesired. It appears that in pymate.rb the executable is getting incorrectly (IMHO) defined.
def executable; @hashbang || ENV['TM_PYTHON'] || 'python' end
shouldn't this be
def executable; ENV['TM_PYTHON'] || @hashbang || 'python' end
So you can overide the variable?
---
Steven M. Klass
Strategic Manager, Design Automation - Analog Mixed Signal
SMSC 3930 East Ray Road, Suite 200 Phoenix, Arizona 85044 (480) 704-7046 (Desk) (480) 225-1112 (Mobile) steven.klass@smsc.com
"Kumar McMillan" kumar.mcmillan@gmail.com Sent by: textmate-bounces@lists.macromates.com 03/12/07 02:51 PM
Please respond to TextMate users textmate@lists.macromates.com
To "TextMate users" textmate@lists.macromates.com cc
Subject Re: [TxMt] Pymate using the wrong version of python..
from the looks of PyMate, your script's hash bang will override $TM_PYTHON (not sure if this is correct behavior) so all I can think is that there is a path issue in TextMate that you're not seeing in your shell. I did a quick test : /usr/bin/env python -V executed from my TextMate shows my expected python version.
On 3/12/07, Steven.Klass@smsc.com Steven.Klass@smsc.com wrote:
Hi Foks,
Not sure if this goes to you all or not but Pymate is using the
wrong version of python when it runs my script. Basically I have a
script
which looks like this
#!/usr/bin/env python print "Hi"
It fires python version 2.3.5.
If I open a shell and type /usr/bin/env python it brings up the version
I
want. I have set TM_PYTHON to point to the version I want but still no luck.
Any
ideas?
Steven M. Klass
Strategic Manager, Design Automation - Analog Mixed Signal
SMSC 3930 East Ray Road, Suite 200 Phoenix, Arizona 85044 (480) 704-7046 (Desk) (480) 225-1112 (Mobile) steven.klass@smsc.com
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
______________________________________________________________________ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
______________________________________________________________________ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
______________________________________________________________________ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate