<s> from traits . api import HasStrictTraits , Int , Instance , List , Regex , Str <EOL> from traitsui . api import View , Item , InstanceEditor <EOL> class Person ( HasStrictTraits ) : <EOL> name = Str <EOL> age = Int <EOL> phone = Regex ( value = '<STR_LIT>' , <EOL> regex = '<STR_LIT>' ) <EOL> traits_view = View ( '<STR_LIT:name>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> people = [ <EOL> Person ( name = '<STR_LIT>' , age = <NUM_LIT> , phone = '<STR_LIT>' ) , <EOL> Person ( name = '<STR_LIT>' , age = <NUM_LIT> , phone = '<STR_LIT>' ) , <EOL> Person ( name = '<STR_LIT>' , age = <NUM_LIT> , phone = '<STR_LIT>' ) , <EOL> Person ( name = '<STR_LIT>' , age = <NUM_LIT> , phone = '<STR_LIT>' ) , <EOL> Person ( name = '<STR_LIT>' , age = <NUM_LIT> , phone = '<STR_LIT>' ) , <EOL> Person ( name = '<STR_LIT>' , age = <NUM_LIT> , phone = '<STR_LIT>' ) , <EOL> Person ( name = '<STR_LIT>' , age = <NUM_LIT> , phone = '<STR_LIT>' ) , <EOL> Person ( name = '<STR_LIT>' , age = <NUM_LIT> , phone = '<STR_LIT>' ) <EOL> ] <EOL> class Team ( HasStrictTraits ) : <EOL> name = Str <EOL> captain = Instance ( Person ) <EOL> roster = List ( Person ) <EOL> traits_view = View ( Item ( '<STR_LIT:name>' ) , <EOL> Item ( '<STR_LIT:_>' ) , <EOL> Item ( '<STR_LIT>' , <EOL> label = '<STR_LIT>' , <EOL> editor = <EOL> InstanceEditor ( name = '<STR_LIT>' , <EOL> editable = True ) , <EOL> style = '<STR_LIT>' , <EOL> ) , <EOL> buttons = [ '<STR_LIT:OK>' ] ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> Team ( name = '<STR_LIT>' , <EOL> captain = people [ <NUM_LIT:0> ] , <EOL> roster = people ) . configure_traits ( ) </s>
