[TxMt] Linefeeds in commands & snippets
alaskamike at gmail.com
Sat May 13 01:51:52 UTC 2006
On May 12, 2006, at 2:01 AM, textmate-request at lists.macromates.com
> To: TextMate users <textmate at lists.macromates.com>
> Subject: Re: [TxMt] Linefeeds in commands & snippets
> Reply-To: TextMate users <textmate at lists.macromates.com>
> This is a Python issue. Python writes a newline to the end of all
> print statements, which is where this is coming from. You could write:
> print newtask,
> which would not write a newline, but would add a space. In order to
> write -just- the text, this would work:
> import os,sys
> def texter():
> oldtask = os.environ['TM_CURRENT_LINE']
> # oldtask = "Alligator"
> newtask = "DONE "
> for i in range (len(oldtask)):
> if i > 4:
> newtask = newtask + oldtask[i]
Thanks for the help, I thought it was something I was doing wrong in
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the textmate