[nylug-workshop] Input strategies

Dan Crosta dcrosta at sccs.swarthmore.edu
Sun Dec 10 12:18:51 EST 2006


On Dec 10, 2006, at 3:14 AM, Peter C. Norton wrote:
> I'm going to guess that's because they're part of the standard ASCII
> key value definitions.
>
> I just took a look, and if you import curses, curses.ascii, then you
> can test to see if a key is equal to curses.ascii.ESC,
> curses.ascii.TAB, or curses.ascii.LF.

D'oh! Of course. (see r147 [1])

In other news, DTK has somewhat sensible support of the logging  
module now (in r148). There is a logger named 'dtk' which  
CursesEngine and Engine write to, and each Drawable gets its own  
logger named:

   'dtk.' + self.__class__.__name__

which gets us things like 'dtk.Rows' and 'dtk.TextEditor' -- any  
calls to self.log.foo() from within a Drawable will now create log  
lines through that logger, which at some point or under certain  
circumstances we may want to filter.

- d


[1] for the curious, the easiest way to browse changesets is through  
my Trac. for a given changeset number, just point your browser at  
https://firefly.student.swarthmore.edu/trac/changeset/<num>. Trac  
ought to let you see any changesets on the trunk/dtk hierarchy of the  
repository without any special permissions.


More information about the nylug-workshop mailing list