parameters: (self,event)
docstring: The real workhorse of this class. First we retrieve the object
          (parent) belonging to the branch that is to be expanded. This
          is done by calling GetPyData(parent), which is a short-cut for
          GetPyItemData(parent).Get().
  
          Then we get the dir() list of that object. For each item in
          this list, a tree item is created with associated
          wxTreeItemData referencing the child object. We get this
          object using child = getattr(parent, item).
  
          Finally, we check wether the child returns a non-empty dir()
          list. If so, it is labeled as 'having children', so that it
          may be expanded. When it actually is expanded, this function
          will again figure out what the offspring is.
docstring_summary: The real workhorse of this class. First we retrieve the object
          (parent) belonging to the branch that is to be expanded. This
          is done by calling GetPyData(parent), which is a short-cut for
          GetPyItemData(parent).Get().
docstring_tokens: The real workhorse of this class . First we retrieve the object ( parent ) belonging to the branch that is to be expanded . This is done by calling GetPyData ( parent ) which is a short - cut for GetPyItemData ( parent ) . Get () .
function: def OnItemExpanding(self,event):
          """
          The real workhorse of this class. First we retrieve the object
          (parent) belonging to the branch that is to be expanded. This
          is done by calling GetPyData(parent), which is a short-cut for
          GetPyItemData(parent).Get().
  
          Then we get the dir() list of that object. For each item in
          this list, a tree item is created with associated
          wxTreeItemData referencing the child object. We get this
          object using child = getattr(parent, item).
  
          Finally, we check wether the child returns a non-empty dir()
          list. If so, it is labeled as 'having children', so that it
          may be expanded. When it actually is expanded, this function
          will again figure out what the offspring is.
          """
          item = event.GetItem()
  
          if self.IsExpanded(item):  # This event can happen twice in the self.Expand call
              return
              
          obj = self.GetPyData( item )
          lst = dir(obj)
  
          for key in lst:
              new_obj = getattr(obj,key)
              new_item = self.AppendItem( item, key, -1, -1,
                                          wx.TreeItemData(new_obj) )
  
              if dir(new_obj):
                  self.SetItemHasChildren(new_item, True)
function_tokens: def OnItemExpanding ( self , event ) : item = event . GetItem ( ) if self . IsExpanded ( item ) : # This event can happen twice in the self.Expand call return obj = self . GetPyData ( item ) lst = dir ( obj ) for key in lst : new_obj = getattr ( obj , key ) new_item = self . AppendItem ( item , key , - 1 , - 1 , wx . TreeItemData ( new_obj ) ) if dir ( new_obj ) : self . SetItemHasChildren ( new_item , True )