def build_shed_tool_conf_select_field(app):
 options = []
 for dynamic_tool_conf_filename in app.toolbox.dynamic_conf_filenames():
  if dynamic_tool_conf_filename.startswith('./'):
   option_label = dynamic_tool_conf_filename.replace('./', '', 1)
  else:
   option_label = dynamic_tool_conf_filename
  options.append((option_label, dynamic_tool_conf_filename))
 select_field = SelectField(name='shed_tool_conf')
 for option_tup in options:
  select_field.add_option(option_tup[0], option_tup[1])
 return select_field

def build_shed_tool_conf_select_field ( app ) : options = [ ] for dynamic_tool_conf_filename in app . toolbox . dynamic_conf_filenames ( ) : if dynamic_tool_conf_filename . startswith ( './' ) : option_label = dynamic_tool_conf_filename . replace ( './' , '' , 1 ) else : option_label = dynamic_tool_conf_filename options . append ( ( option_label , dynamic_tool_conf_filename ) ) select_field = SelectField ( name = 'shed_tool_conf' ) for option_tup in options : select_field . add_option ( option_tup [ 0 ] , option_tup [ 1 ] ) return select_field
build a selectfield whose options are the keys in app .