uri-mog / prettytable

Automatically exported from code.google.com/p/prettytable
Other
0 stars 0 forks source link

Bash color #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

Do you think it could be easy to espace bash color codes like that ?

'\033[1;37;40mHello World\033[2;32;40m'

Cause at this time, prettytable count each characters to set column width.

Best regards,
Socketubs.

Original issue reported on code.google.com by geoff...@lehee.name on 26 Oct 2012 at 9:36

GoogleCodeExporter commented 8 years ago
This is a good idea, thanks for making me aware of it.  I will endeavour to get 
this feature in a future version.

Original comment by luke@maurits.id.au on 31 Oct 2012 at 5:58

GoogleCodeExporter commented 8 years ago
Issue 25 has been merged into this issue.

Original comment by luke@maurits.id.au on 17 Feb 2013 at 8:15

GoogleCodeExporter commented 8 years ago
I have made an update in trunk which should solve your problems.  If you have 
time to test it out, that would be great.

Original comment by luke@maurits.id.au on 19 Feb 2013 at 5:36

GoogleCodeExporter commented 8 years ago
Works like a charm!
Thanks luke.

Original comment by geoff...@lehee.name on 19 Feb 2013 at 8:58

GoogleCodeExporter commented 8 years ago
Splendid!  Thanks for testing.  This was actually much easier to sort out than 
I expected, I regret not giving it a shot earlier - it may have made it into 
0.7 if I had!  I have made a few other small improvements lately so I might do 
a 0.7.1 release this coming weekend which will include the colour code support.

Original comment by luke@maurits.id.au on 20 Feb 2013 at 7:44

GoogleCodeExporter commented 8 years ago
It's a great news!

Original comment by geoff...@lehee.name on 20 Feb 2013 at 8:56

GoogleCodeExporter commented 8 years ago
Hi! I have one question related to this issue.

I have to colorize some chars of a string which is into a cell. How can I do 
this?

I've tried this sentence:
table.add_row(["Destination Address", '\033[1;38mpacket1.addr1\033[1;m', 
packet2.addr1])

But it isnt't working.

Thanks in advance!

Original comment by capitan....@gmail.com on 21 Oct 2013 at 12:22