I've got a problem which is a bit difficult to explain. I have a module which consists of more than one class: someModule.py
#imports over here class Default(Base): def __init__(self): a = Rectangle() #all these guys derive from Shape b = Circle() c = Sphere() class Foo: #members over here #other classes/functions/whatever we can define here, except the boiler plate code to check __main__ What i want to do is create an object of the class which derives from a specific base class (eg. Base) at run time and manipulate those data members which derive from another specific base class (eg. Shape). Meaning i want to write such a script that takes module name and performs the above task. Any ideas how i can do this using inspect or something else? I've taken a look at inspect but didn't quite find the methods that should get the job done. I may be missing something.