<s> import wx <EOL> from traits . api import Trait , HasTraits , Str , Int <EOL> from traitsui . api import View , Group <EOL> from traits . api import Color <EOL> class Employer ( HasTraits ) : <EOL> company = Str <EOL> boss = Str <EOL> view = View ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> class Person ( HasTraits ) : <EOL> name = Str ( '<STR_LIT>' ) <EOL> age = Int ( <NUM_LIT> ) <EOL> view = View ( '<STR_LIT:name>' , '<STR_LIT>' , '<STR_LIT>' , kind = '<STR_LIT>' ) <EOL> class ExtraPerson ( Person ) : <EOL> sex = Trait ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> eye_color = Color <EOL> extra = Group ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> class LocatedPerson ( Person ) : <EOL> street = Str <EOL> city = Str <EOL> state = Str <EOL> zip = Int ( <NUM_LIT> ) <EOL> extra = Group ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT:state>' , '<STR_LIT>' ) <EOL> class EmployedPerson ( LocatedPerson ) : <EOL> employer = Trait ( Employer ( company = '<STR_LIT>' , boss = '<STR_LIT>' ) ) <EOL> extra = Group ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> class TraitSheetApp ( wx . App ) : <EOL> def __init__ ( self ) : <EOL> wx . InitAllImageHandlers ( ) <EOL> wx . App . __init__ ( self , <NUM_LIT:1> , '<STR_LIT>' ) <EOL> self . MainLoop ( ) <EOL> def OnInit ( self ) : <EOL> Person ( ) . edit_traits ( ) <EOL> ExtraPerson ( ) . edit_traits ( ) <EOL> LocatedPerson ( ) . edit_traits ( ) <EOL> EmployedPerson ( ) . edit_traits ( ) <EOL> return True <EOL> TraitSheetApp ( ) </s>
