Terry J. Reedy added the comment: In comment for 31003, Cheryl pointed to https://stackoverflow.com/questions/4140437/interactively-validating-entry-widget-content-in-tkinter#4140988
That prompted me to grep for 'validatecommand'. "validatecommand=is_int" is used on the extension tab. The function is at the end of the file. We just need to modify to is_pos_int and use it the same way. is_int allows blanks. That should mean to accept the default, whatever is it. A blank should be turned back to the default. is_int checks that int(entry) does not raise value error. I believe int now accept non-ascii digits. We should check that that such pass through configparser okay. (I believe they should, as I believe it just calls int on the string read.) Or only store the ascii version. I suspect that tk wants ascii digits, The confusion of converting between strings and non-string objects is exacerbated by tk wanting strings (which it converts to C byte encodings) and tkinter doing automatic conversions. ---------- nosy: +csabella, louielu _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue31051> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com