def getSelectedRadioPlugin(names, radioPlugins):
 for radioPlugin in radioPlugins:
  if radioPlugin.value:
   return radioPlugin
 for name in names:
  for radioPlugin in radioPlugins:
   if (radioPlugin.name == name):
    radioPlugin.value = True
    return radioPlugin
 print 'this should never happen, no getSelectedRadioPlugin in settings'
 print names
 return radioPlugin[0]

def getSelectedRadioPlugin ( names , radioPlugins ) : for radioPlugin in radioPlugins : if radioPlugin . value : return radioPlugin for name in names : for radioPlugin in radioPlugins : if ( radioPlugin . name == name ) : radioPlugin . value = True return radioPlugin print 'this should never happen, no getSelectedRadioPlugin in settings' print names return radioPlugin [ 0 ]
get the selected radio button if it exists .