[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RHS: libterm-ansicolor-ruby

On Wed, Aug 15, 2007 at 04:02:57PM -0000, Thomas Dickey wrote:
> (no point in hardcoding "a few dozen string" definitions, unless
> one _likes_ the nasty comments that people make when they read the
> code ;-)

Completely agree. My point was that, when I've *needed* ANSI color
and similar capabilities in an application where I didn't want to
(or couldn't) use curses, I've usually coded the necessary
definitions into whatever custom Python module I wrote to do display
handling, or set up macros in a C header, and it's not exactly been
a burdensome amount of code to throw together from scratch.

That's not to say that I wouldn't be thrilled if Python upstream
started to carry these definitions as part of its core modules (like
they do with, say, Telnet IAC sequences). Closest I can find is
definitions like curses.ascii.ESC, curses.COLOR_RED and
curses.A_NORMAL... I could hack those (wrapped with chr() or str()
calls where appropriate) into my colorize functions in place of some
of my constants, but that would be even uglier in my opinion.

Anyway, time for me to stop derailing the discussion (pun intended).
{ IRL(Jeremy_Stanley); PGP(9E8DFF2E4F5995F8FEADDC5829ABF7441FB84657);
SMTP(fungi@yuggoth.org); IRC(fungi@irc.yuggoth.org#ccl); ICQ(114362511);
AIM(dreadazathoth); YAHOO(crawlingchaoslabs); FINGER(fungi@yuggoth.org);
MUD(fungi@katarsis.mudpy.org:6669); WWW(http://fungi.yuggoth.org/); }

Reply to: