def getPreferenceFloat(name):
 try:
  setting = getPreference(name).replace(',', '.')
  return float(eval(setting, {}, {}))
 except:
  return 0.0

def getPreferenceFloat ( name ) : try : setting = getPreference ( name ) . replace ( ',' , '.' ) return float ( eval ( setting , { } , { } ) ) except : return 0.0
get the float value of a preference .