Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python use string to get object attributes

#There are built-in functions called getattr and setattr
getattr(object, attrname)
setattr(object, attrname, value)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #string #object #attributes
ADD COMMENT
Topic
Name
3+8 =