Green apples tab $7
Since there's only one field in the first line, I want this output:
trtd colspan=3Price table/td/tr
- insted of
trtdPrice table/td/tr
How to? Thank you i advance.
--
Venlig hilsen
Kurt Hansen
--
http://mail.python.org/mailman/listinfo/python-list
Den 06/01/13 13.52, Chris Angelico skrev:
On Sun, Jan 6, 2013 at 11:42 PM, Kurt Hansen kurt@ugyldig.invalid wrote:
Since there's only one field in the first line, I want this output:
trtd colspan=3Price table/td/tr
- insted of
trtdPrice table/td/tr
How to? Thank you i advance.
It's
not experienced, so please tell me exactly
where it's surposed to be inserted. Could you eventually show the
complete modified script?
*From:* Kurt Hansen kurt@ugyldig.invalid
*To:* python-list@python.org
*Sent:* Sunday
Den 06/01/13 14.44, Chris Angelico wrote:
On Mon, Jan 7, 2013 at 12:34 AM, Kurt Hansen kurt@ugyldig.invalid wrote:
innermost? I have replaced this with yours, but all the marked text are
deleted:
Here's the full code, with my change:
$
lines = $GEDIT_SELECTED_TEXT.split(\n);
output = 'table
+= addline(columns)
output += /table
print output
--
Venlig hilsen
Kurt Hansen
--
http://mail.python.org/mailman/listinfo/python-list
Den 06/01/13 15.20, Chris Angelico wrote:
On Mon, Jan 7, 2013 at 1:03 AM, Kurt Hansen kurt@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
:
output += 'trtd colspan=3', line, '/td/tr'
else:
for item in columns:
output += 'td' + item + '/td '
output += '/tr\n';
output += '/table';
return output) failed: cannot concatenate 'str' and 'tuple' objects
--
Venlig hilsen
Kurt
Den 06/01/13 15.52, Chris Angelico skrev:
On Mon, Jan 7, 2013 at 1:40 AM, Kurt Hansen kurt@ugyldig.invalid wrote:
failed: cannot concatenate 'str' and 'tuple' objects
The problem is this line:
output += 'trtd colspan=3', line, '/td/tr'
Change it to:
output += 'trtd colspan=3' + line + '/td
.
*From:* Kurt Hansen kurt@ugyldig.invalid
*To:* python-list@python.org
*Sent:* Sunday, January 6, 2013 3:21 PM
*Subject:* Re: How to modify this script?
Den 06/01/13 15.01, chaouche yacine wrote:
Well, I'm not answering your question since I am rewriting
-defined hotkey or by pushing
ctrl+space and select my snippet from a list.
The copied text is inserted as clean text without any HTML. The
Python-snippet we are discussing recognizes tabs to separate the columns
and adds the apprpriate HTML-code to it.
--
Regards
Kurt Hansen
--
http
Den 06/01/13 15.20, Chris Angelico wrote:
That version should work.
Am 06.01.2013 15:30 schrieb Kurt Hansen:
It certainly does. I'll keep it and use it until at better solution is
found.
On 08/01/13 15.18, Thomas Rachel wrote:
That would be simple:
Replace
output += 'td colspan
(see link
above). You may ommit the rows after track 14. Not that it makes any
differerence, but that block is surposed to be formatted differerent. I
do that manually afterwards ... if not ... ;-)
--
Regards
Kurt Hansen
--
http://mail.python.org/mailman/listinfo/python-list
is formatted
properly; refinements of some collapsed fields with with line breaks
a.o. is up to me now ;-).
Thanks to you and others who have participated in this thread.
--
Venlig hilsen
Kurt Hansen
--
http://mail.python.org/mailman/listinfo/python-list
13 matches
Mail list logo