To get all property of a class?
manuel
manuelbastioni at tin.it
Mon Jun 30 08:48:15 EDT 2003
> import os
> for (name,value) in os.__dict__:
> print name,"=",value
it don't work (I'm using python into Blender distribution,
no full python installed).
I try with various modules, like
import Blender
for (name,value) in Blender.__dict__:
print name,"=",value
This is the error message:
Traceback (most recent call last):
File "Text.003", line 2, in ?
ValueError: too many values to unpack
The method of Egor don't work too. I've tried
with a list of lamp objects (instances of povlamp class):
for lamp in lamps:
for i in dir(lamp):
if i[0] != "_":
print lamp.i
Result:
AttributeError: PovLamp instance has no attribute 'i'
More information about the Python-list
mailing list