Hi Tom. I know nothing about plug-in frameworks, but will throw in
$0.02…
First, Boa Constructor also has plug-ins, of all different sorts, if that ishelpful to know.
Based on how you described your goals, maybe a simple starting thing to do
(not really a plug-in) would be to just create all your apps/plugins/applets
as
panels (what Boa calls “FramePanels”), just a panel class saved in its own
module to used, for example, as a page in a wxNotebook. Then when the
user selects using that app, the module is imported then and the panel is
added to the notebook with .AddPage(). If the app requires a more complex
and multi-frame/panel layout, sure, maybe this won’t work, but if it is
something that can work on one panel, this might at least be fine to get
started.btw, Chris Barker: thanks for posting Ed Leafe’s talk about Springboard.
Interesting idea, and kudos to Ed for making it.
Che
Thanks Che,
That was indeed the initial way I was thinking about it. Have all separate applications running in a wx.Panel and add the panel to a tabpage in the main application.
The question then would be how to get the panel from loading the plugin. Obviously, I could have a function GetPanel() which returns the panel containing the sub-application (or plugin), but then I guess that would mean the main application should already be aware of the class containing the new sub-application.
So e.g. say I have a plugin file called “newPlugin.py” which contains a class newPlugin. This class contains a derived panel where all functionality is provided. In addition the newPlugin class contains a method GetPlugin() which returns this panel. The question now is, how could I get the main application to know the “newPlugin” class without hardcoding it, such that I could load the plugin simply by loading the newPlugin.py file in the main app.
Best regards,
Tom.