<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Steven,<DIV><BR class="khtml-block-placeholder"></DIV><DIV>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.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>To understand why /usr/bin/env python doesn't find python2.5, see here:</DIV><DIV><A href="http://macromates.com/textmate/manual/shell_commands">http://macromates.com/textmate/manual/shell_commands</A></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>That should solve the problem.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>–Alex</DIV><DIV><BR><DIV><DIV>On Mar 12, 2007, at 3:16 PM, <A href="mailto:Steven.Klass@smsc.com">Steven.Klass@smsc.com</A> wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><BR><FONT size="2" face="sans-serif">Hi Kumar,</FONT> <BR> <BR><FONT size="2" face="sans-serif"> 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.</FONT> <BR> <BR><FONT size="2" face="sans-serif"> def executable; @hashbang || ENV['TM_PYTHON'] || 'python' end</FONT> <BR> <BR><FONT size="2" face="sans-serif">shouldn't this be</FONT> <BR> <BR><FONT size="2" face="sans-serif"> def executable; ENV['TM_PYTHON'] || @hashbang || 'python' end</FONT> <BR> <BR><FONT size="2" face="sans-serif">So you can overide the variable?</FONT> <BR> <BR><FONT size="2" face="sans-serif">---<BR> <BR> Steven M. Klass<BR> <BR> Strategic Manager, Design Automation - Analog Mixed Signal<BR> <BR> SMSC<BR> 3930 East Ray Road, Suite 200<BR> Phoenix, Arizona 85044<BR> (480) 704-7046 (Desk)<BR> (480) 225-1112 (Mobile)<BR> <A href="mailto:steven.klass@smsc.com">steven.klass@smsc.com</A></FONT> <BR> <BR> <BR> <TABLE width="100%"> <TBODY><TR valign="top"><TD width="40%"><FONT size="1" face="sans-serif"><B>"Kumar McMillan" <<A href="mailto:kumar.mcmillan@gmail.com">kumar.mcmillan@gmail.com</A>></B> </FONT> <BR><FONT size="1" face="sans-serif">Sent by: <A href="mailto:textmate-bounces@lists.macromates.com">textmate-bounces@lists.macromates.com</A></FONT><P><FONT size="1" face="sans-serif">03/12/07 02:51 PM</FONT> <TABLE border=""> <TBODY><TR valign="top"><TD bgcolor="white"> <DIV align="center"><FONT size="1" face="sans-serif">Please respond to<BR> TextMate users <<A href="mailto:textmate@lists.macromates.com">textmate@lists.macromates.com</A>></FONT></DIV></TD></TR></TBODY></TABLE> <BR> </P></TD><TD width="59%"> <TABLE width="100%"> <TBODY><TR valign="top"><TD> <DIV align="right"><FONT size="1" face="sans-serif">To</FONT></DIV> </TD><TD><FONT size="1" face="sans-serif">"TextMate users" <<A href="mailto:textmate@lists.macromates.com">textmate@lists.macromates.com</A>></FONT> </TD></TR><TR valign="top"><TD> <DIV align="right"><FONT size="1" face="sans-serif">cc</FONT></DIV> </TD><TD> </TD></TR><TR valign="top"><TD> <DIV align="right"><FONT size="1" face="sans-serif">Subject</FONT></DIV> </TD><TD><FONT size="1" face="sans-serif">Re: [TxMt] Pymate using the wrong version of python..</FONT></TD></TR></TBODY></TABLE> <BR> <TABLE> <TBODY><TR valign="top"><TD> </TD><TD></TD></TR></TBODY></TABLE> <BR></TD></TR></TBODY></TABLE> <BR> <BR> <BR><TT><FONT size="2">from the looks of PyMate, your script's hash bang will override<BR> $TM_PYTHON (not sure if this is correct behavior) so all I can think<BR> is that there is a path issue in TextMate that you're not seeing in<BR> your shell. I did a quick test : /usr/bin/env python -V executed from<BR> my TextMate shows my expected python version.<BR> <BR> On 3/12/07, <A href="mailto:Steven.Klass@smsc.com">Steven.Klass@smsc.com</A> <<A href="mailto:Steven.Klass@smsc.com">Steven.Klass@smsc.com</A>> wrote:<BR> ><BR> > Hi Foks,<BR> ><BR> > Not sure if this goes to you all or not but Pymate is using the<BR> > wrong version of python when it runs my script. Basically I have a script<BR> > which looks like this<BR> ><BR> > #!/usr/bin/env python<BR> > print "Hi"<BR> ><BR> > It fires python version 2.3.5.<BR> ><BR> > If I open a shell and type /usr/bin/env python it brings up the version I<BR> > want.<BR> > I have set TM_PYTHON to point to the version I want but still no luck. Any<BR> > ideas?<BR> ><BR> ><BR> > ---<BR> ><BR> > Steven M. Klass<BR> ><BR> > Strategic Manager, Design Automation - Analog Mixed Signal<BR> ><BR> > SMSC<BR> > 3930 East Ray Road, Suite 200<BR> > Phoenix, Arizona 85044<BR> > (480) 704-7046 (Desk)<BR> > (480) 225-1112 (Mobile)<BR> > <A href="mailto:steven.klass@smsc.com">steven.klass@smsc.com</A><BR> ><BR> > ______________________________________________________________________<BR> > For new threads USE THIS: <A href="mailto:textmate@lists.macromates.com">textmate@lists.macromates.com</A><BR> > (threading gets destroyed and the universe will collapse if you don't)<BR> > <A href="http://lists.macromates.com/mailman/listinfo/textmate">http://lists.macromates.com/mailman/listinfo/textmate</A><BR> ><BR> <BR> ______________________________________________________________________<BR> For new threads USE THIS: <A href="mailto:textmate@lists.macromates.com">textmate@lists.macromates.com</A><BR> (threading gets destroyed and the universe will collapse if you don't)<BR> <A href="http://lists.macromates.com/mailman/listinfo/textmate">http://lists.macromates.com/mailman/listinfo/textmate</A><BR> </FONT></TT> <BR><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">______________________________________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">For new threads USE THIS: <A href="mailto:textmate@lists.macromates.com">textmate@lists.macromates.com</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">(threading gets destroyed and the universe will collapse if you don't)</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://lists.macromates.com/mailman/listinfo/textmate">http://lists.macromates.com/mailman/listinfo/textmate</A></DIV> </BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>