You could try some trick as mentioned here:

  
      stackoverflow.com
  
  
      
    
  

  getattr and setattr on nested subobjects / chained properties? 39



  python, python-2.7, recursion, attributes



  
  answered by
  
    unutbu
  
  on 01:49AM - 02 Jul 15 UTC