(no title)
erikrose | 13 years ago
As for hanging everything off the Terminal instance, the motivation is that there's significant state on it that you might want to customize. Things like type (ANSI, vt100, etc.) and whether to suppress or force styling affect the result of formatting methods. See http://packages.python.org/blessings/#blessings.Terminal.__i.... I've several times benefitted by making a formatting-suppressed Terminal and passing it around.
I fully endorse you saying...
term = Terminal()
...at the top level of some module and referencing it there. Then you get the init-on-import behavior you want, but it's not forced on anybody who'd rather not have it.Cheers!
ciupicri|13 years ago