Mailing List Archive

format of event.char?
Hi everyone. I'm wondering what the format of event.char is...how can I
append it to a string? I've got a string, self.str, and a callback
bound to keystrokes:

def callback(self, event):
self.str = self.str + event.char


...but this doesn't work. The exact error is (ommitting trace):

TypeError: neither _and_ nor _rand_ defined for these operands

So how does one use event.char for things other than printing?


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
format of event.char? [ In reply to ]
Hi everyone. I'm wondering what the format of event.char is...how can I
append it to a string? I've got a string, self.str, and a callback
bound to keystrokes:

def callback(self, event):
self.str = self.str + event.char


...but this doesn't work. The exact error is (ommitting trace):

TypeError: neither _and_ nor _rand_ defined for these operands

So how does one use event.char for things other than printing?


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.