I think using dir will get u essentially the same thing __dict__ normally does ...
targetValue = "value"
for k in dir(obj):
if getattr(obj,k) == targetValue:
print "%s=%s"%(k,targetValue)
something like
>>> class x:
... a = "value"
...
>>> dir(x)
['__doc__', '__module__', 'a']
>>> X = x()
>>> dir(X)
['__doc__', '__module__', 'a']
>>> for k in dir(X):
... if getattr(X,k) == "value":
... print "%s=%s"%(k,getattr(X,k))
...
a=value
>>>