Thanks so much, this is great. I want to validate that the user is entering a
string appropriate for bytes.fromhex. Here's how I modified your validate
funtion:
def validate(before, after):
print(before, "-->", after)
#return after.isdigit()
return after[-1] in '1234567890abcdefABCDEF '
I also had to change validate="all" to validate="key" in the Entry
construction, since otherwise, I go an IndexError when the widget gets the
focus. (try...except also worked, but I only care about keystrokes.)
I didn't know about the register method; that's the key.
Thanks again,
Saul
--
http://mail.python.org/mailman/listinfo/python-list