Hi Peter,
thank you for your replay, but I was looking for a very
short routine. I even had in mind to use Linux & bash
(only one command line).
It seems that tab expansion, made by print, prevents
the working of the escape sequences for colors.
In fact, if you replace tab with a given number of sp
qwweeeit wrote:
> Hi all,
> from a string embedding tabs I want to colorize them when expanded:
>
> # Starting from a string:
> a= '1234\t5678\t\t90\nqwerty\nasdfg'
> # which embeds both tabs and lfs
>
> # printing it you obtain:
> print a
> # 1234567890
> # qwerty
> # asdfg
>
>