On Wed, 11 Aug 2010 10:27:17 +0100, [email protected] wrote: > Hi all, > > I've been taking a close look at this file with a colleague who is far > better at Python than me and we are struggling to understand the > nature of this code. > > It appears to re-implement (and in some areas replace!) a large part > of the python internal import code and we're wondering what the reason > behind this could be. > > Is there anyone on the list who can explain or can point me in the > direction of someone who might be able to help?
It is mostly black magic to me. But I don't think it actually re-implements what the python import code does. It more 'enhances' it. The goal is for the rest of cobbler to be able to work with code that implements a feature. Then the user can choose what module implements that feature. The only part that is really black magic is how it figures out what is actually being imported. Really, what it is doing is doing an os glob on the modules directory and then figuring out what the user has selected in the modules.conf file. Then providing the loaded modules to whatever code requests it. -- Scott Henson Red Hat CIS Operator WVU Alum BSAE/BSME _______________________________________________ cobbler mailing list [email protected] https://fedorahosted.org/mailman/listinfo/cobbler
