but
with this script the basic codes of rows and columns 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
table online (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
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 += &
; the
snippet upon the text, either using my self-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 HTM
Thank you for trying to help.
--------
*From:* Kurt Hansen
*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
Den 06/01/13 15.52, Chris Angelico skrev:
On Mon, Jan 7, 2013 at 1:40 AM, Kurt Hansen wrote:
failed: cannot concatenate 'str' and 'tuple' objects
The problem is this line:
output += '', line, ''
Change it to:
output += '' + line + '
line.split("\t");
if len(columns)==1:
output += '', line, ''
else:
for item in columns:
output += '' + item + ' '
output += '\n';
output += '';
return
Den 06/01/13 15.20, Chris Angelico wrote:
On Mon, Jan 7, 2013 at 1:03 AM, Kurt Hansen 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 i
t;%s" % (3 - nb_columns + 1, item)
return "%s" % item
output = "\n"
for line in file("data.txt"):
items = line.strip().split("\t")
columns = ""
for item in items :
columns += addcolumn(item,len(items))
output += addli
Den 06/01/13 14.44, Chris Angelico wrote:
On Mon, Jan 7, 2013 at 12:34 AM, Kurt Hansen 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");
o
that I'm 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
*To:* python-list@python.org
*Sent:* Sunda
Den 06/01/13 13.52, Chris Angelico skrev:
On Sun, Jan 6, 2013 at 11:42 PM, Kurt Hansen wrote:
Since there's only one "field" in the first line, I want this output:
Price table
- insted of
Price table
How to? Thank you i advance.
It's actually quite simple, as long a
s:
Price table
1 Green apple $1
5 Green apples $4
10 Green apples $7
Since there's only one "field" in the first line, I want this output:
Price table
- insted of
Price table
How to? Thank you i advance.
--
Venlig hilsen
Kurt Hansen
--
http://mail.python.org/mailman/listinfo/python-list
13 matches
Mail list logo