PEATDB/Tables.py
def check_data_entry(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
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 check_data_entry(self,event=None):
        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 check_data_entry ( self , event = None ) : 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
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""" #if user enters commas, change to points
self
event