x = getattr(t, 'attr1')
setattr(t, 'attr1', 21)
import inspect
class myclass:
a = 5
def method(b):
return b
for i in inspect.getmembers(myclass):
print(i)
field_name = "fullName"
print getattr(user, field_name) # prints content of user.fullName