If I have a class as follows:
class myclass(object): i = 20 j = 30 k = 40 def __init__(self): self.myvariable = 50
You can also use the inspect module:
>>> [x for x in inspect.getmembers(myclass) if not x[0].startswith('__')] [('i', 20), ('j', 30), ('k', 40)]