How to modify this script?

Kurt Hansen kurt at ugyldig.invalid
Sun Jan 6 09:30:15 EST 2013


Den 06/01/13 15.20, Chris Angelico wrote:
> On Mon, Jan 7, 2013 at 1:03 AM, Kurt Hansen <kurt at ugyldig.invalid> wrote:
>> I'm sorry to bother you, Chris, but applying the snippet with your code in
>> Gedit still just deletes the marked, tab-separated text in the editor.

> Ah, whoops. That would be because I had a bug in the code (that's why
> I commented that it was untested). Sorry about that! Here's a fixed
> version:
>
[cut]>
> Note that it's a single line:
>
> output += '<td colspan="' + str(4-len(columns)) + '"\>' + item + '</td\> '
>
> If your newsreader (or my poster) wraps it, you'll need to unwrap that
> line, otherwise you'll get an IndentError.

Ahhh, I did'nt realize that. Now it works :-)

> That version should work.

It certainly does. I'll keep it and use it until at better solution is 
found. In the meantime I can just remove any unnecessary "colspan="1" 
with a macro.

Thanks for your help.
-- 
Venlig hilsen
Kurt Hansen



More information about the Python-list mailing list