I'm working on a script, I want it to have plug-in modules in the form of Python files in the same directory, however because I'm so lazy I'm using execfile() to include the module code in the running script so I can avoid any problems with scopes etc. At this stage it's working as it should but I've run into a problem. The idea behind the plug-in modules is that they conform to an API and therefore can be written by anybody and contributed to add new functionality, sounds great doesn't it? Problem being is that obviously different "modules" are going to need different Python modules imported to be able to do their dirty work, but import statements in these files don't seem to have any effect. If I import something from the main file it works fine, but this isn't an acceptable long term solution.
I searched before posting here obviously, I found this
but I can't seem to make them relate to my situation. It's still early in the morning but I keep drawing big fat blanks.
If anyone has any tips for ways I could get around this without resorting to importing the plug-in code in the first place I'd really appreciate it!