Creating "virtual" module-namespace
Harald
simon.12.ghum at spamgourmet.com
Thu Dec 12 02:06:07 EST 2002
> It's because b is a dictionary. b['nasenbaer']() would have worked,
> I think, but I don't think it's what you wanted.
No, that is not wat I wanted :-=
> I would do it this way. I'm assuming "something" is an object (an
> instance of some class) and you want to be able to call
> something.nasenbaer().
Not att all... something can be NO object, because nasenbaer is a class
and will instanciate it's own objects.
something is rather a module.
I want to use it as if all the class definition is in one file and I do a
"import nameoffile"
then I have access to all the classes /functions via
newobjekt=nameoffile.class()
thanks for giving thoughts,
Harald
More information about the Python-list
mailing list