Thomas W wrote: > from somemodule import ISomeInteface > > d = compile(sourcecode) > > myfoo = d.Foo() > > print ISomeInterface in myfoo.__bases__ > > Any hints?
Python is a dynamic language, so compiling something won't tell you much
about what the code actually does. the only reliable way to do that is
to execute the code:
code = compile(sourcecode)
namespace = {}
exec code in namespace
print issubclass(namespace["Foo"])
</F>
--
http://mail.python.org/mailman/listinfo/python-list
