def setValue( self, property, value ):
      # Split and traverse the style heirarchy
      parent, itemName = self._getParentOfProperty( property )

      if not hasattr( parent, itemName ):
         msg  = "Could not set the value '%s'\n" % property
         msg += "Valid values are:\n"

         propertyList = dir( parent )
         propertyList.sort()

         for name in propertyList:
            if name.startswith( '_' ):
               continue
            msg += "   * %s" % name

         raise Exception( msg )

      # set the value
      setattr( parent, itemName, value )

   #-----------------------------------------------------------------------
>>> from lxml import etree as ET
dataset/ETHPy150Open nasa/mplStyle/mplStyle/types/Style.py/Style.setValue--crossover with--dataset/ETHPy150Open Crystalnix/omaha-server/omaha_server/omaha/core.py/Packages