After further investigation, I think that this I have found the link you meant to post:  <a href="http://stackoverflow.com/questions/5282567/textmate-execute-line-selection-for-python-broken">http://stackoverflow.com/questions/5282567/textmate-execute-line-selection-for-python-broken</a><div>
<br></div><div>There is indeed a bug in the execute line/selection python code - for a start the error that is shown in TM2 is not helpful, and the error catching code in the script does need fixing to change this (at least!).</div>
<div><br></div><div>I have played around with the rest of the code, and can't decide how it should work.</div><div><br></div><div>Currently it takes the input (current selection, or the current line), and uses eval() to evaluate it.  Of course, this fails for certain statements, such as</div>
<div><br></div><div>print "Hello World"</div><div><br></div><div>I changed my python bundle to use exec, but this fails for things like:</div><div><br></div><div>1+1</div><div><br></div><div>as it doesn't return the output.  Obviously running print 1+1 fixes this</div>
<div><br></div><div>I am hesitant to change the default behaviour of the bundle, as I don't know what the purpose of the command is in the first place :-).  I suggest that you decide between the two approaches and fork the bundle for your own use.</div>
<div><br></div><div>Cheers,</div><div><br></div><div>David.<br><div><br><div class="gmail_quote">On Sun, Feb 26, 2012 at 7:22 PM, David Howden <span dir="ltr"><<a href="mailto:dhowden@gmail.com">dhowden@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Also, I followed that link you gave in relation to the python problem.  I don't see what it has to do with the issue -  I think I'm missing something here?<div>
<br></div><div>Cheers,</div><div><br></div><div>David.<div><div class="h5"><br>
<br><div class="gmail_quote">On Sun, Feb 26, 2012 at 7:16 PM, David Howden <span dir="ltr"><<a href="mailto:dhowden@gmail.com" target="_blank">dhowden@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="gmail_quote"><div>On Sun, Feb 26, 2012 at 5:08 PM, Charles DiMaggio <span dir="ltr"><<a href="mailto:charles.dimaggio@gmail.com" target="_blank">charles.dimaggio@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><br><div>
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div>


OK, then. That last bit helped sort me out on the shell command issue.  I was trying to use ^R  to reach a location that was not in the path that TM inherited from Finder.  Thanks again, David. One issue down, one to go.</div>


<div><br></div></span></div></div></blockquote><div><br></div></div><div>No worries :-).</div><div><br></div><div>Are you using TM2 alpha or TM1?</div><span><font color="#888888"><div><br></div><div>David.</div>
</font></span><div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div>


</div></span></div><div>Charlie</div>
<br><div><div><div>On Feb 26, 2012, at 10:32 AM, David Howden wrote:</div><br></div><blockquote type="cite"><div><div><br><br><div class="gmail_quote">On Sun, Feb 26, 2012 at 3:20 PM, Charles DiMaggio <span dir="ltr"><<a href="mailto:charles.dimaggio@gmail.com" target="_blank">charles.dimaggio@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Hi. I have two different, but related, issues.  <div><br></div><div>First, how does one execute a single line / selection in shell mode?  I've enabled enhanced terminal usage. Script (cmd-R) executes fine, but on the entire document.  The Textmate Manual direction (<a href="http://manual.macromates.com/en/shell_commands" target="_blank">http://manual.macromates.com/en/shell_commands</a>) to use ^R for a line or selection does not produce any results other than a forward slash.</div>



<div><br></div></div></blockquote><div><br></div><div>Create a new file in TextMate, and enter this text:</div><div><br></div><div>echo $PATH</div><div><br></div><div>Then hit Ctrl-R.  What do you see?</div><div><br></div>



<div>Cheers,</div><div><br></div><div>David.</div></div>
<br></div></div><div>_______________________________________________<br>textmate mailing list<br><a href="mailto:textmate@lists.macromates.com" target="_blank">textmate@lists.macromates.com</a><br><a href="http://lists.macromates.com/listinfo/textmate" target="_blank">http://lists.macromates.com/listinfo/textmate</a></div>


</blockquote></div><br></div>
<br><br>
_______________________________________________<br>
textmate mailing list<br>
<a href="mailto:textmate@lists.macromates.com" target="_blank">textmate@lists.macromates.com</a><br>
<a href="http://lists.macromates.com/listinfo/textmate" target="_blank">http://lists.macromates.com/listinfo/textmate</a><br></blockquote></div></div><br>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div></div>