terminal colours by test

while 1:
\x09r = raw_input()

\x09print"".join((p!=c)*("\x1b[4%dm" % "xrgybmcw_ ".find(c)) +"  " + "\x1b[49m"*(n=="\n") for p, c, n in zip(" "+r, r, r[1:]+"\n"))

\x09#sdfgsdfgebsfewwvfefvewfv ewrvsdfwf ewffvwq fqef qef qf qwef wafe  e f efewf ef .. ... .............

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page