def unicodeToFloat(val):
 if (val == 'None'):
  val = None
 else:
  try:
   val = locale.atof(val)
  except ValueError:
   return None
 return val

def unicodeToFloat ( val ) : if ( val == 'None' ) : val = None else : try : val = locale . atof ( val ) except ValueError : return None return val
convert a unicode object from wx dialogs into a float .