(self,event=None)
return 1
do validation checks on data entry in a widget
do validation checks on data entry in a widget
do validation checks on data entry in a widget
def checkDataEntry(self,event=None):
        """do validation checks on data entry in a widget"""
        #if user enters commas, change to points
        import re
        value=event.widget.get()
        if value!='':
            try:
                value=re.sub(',','.', value)
                value=float(value)

            except ValueError:
                event.widget.configure(bg='red')
                return 0
        elif value == '':
            return 1
        return 1
def checkDataEntry ( self , event = None ) : #if user enters commas, change to points import re value = event . widget . get ( ) if value != '' : try : value = re . sub ( ',' , '.' , value ) value = float ( value ) except ValueError : event . widget . configure ( bg = 'red' ) return 0 elif value == '' : return 1 return 1