943,685 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Unsolved
  • Views: 615
  • Python RSS
May 14th, 2008
0

Adding tabs from plugins

Expand Post »
Hi all, I'm pretty new here and I'm also pretty new to Python.

I'm planning this application that would scan a plugins directory on startup and add one tab for each plugin to the main wx.Frame. Now, I got this simple plugin example working, that printed a line from the plugin, but what I need is to somehow import a function from the plugin, into the main wx.Frame class, so that a tab is added in the main window for each plugin with tab capability on initialization. I'm guessing that the plugin function would look something like this:

python Syntax (Toggle Plain Text)
  1. def tab_setup(self):
  2. self.plugin_name = wx.Panel(self.notebook_1, -1)
  3. self.notebook_1.AddPage(self.plugin_name, "Plugin Name")

And this should somehow be automatically imported from each plugin into the frame class in the main script. Does anyone have an idea on how to do this, or could you point me to some good web page that has similar examples?

Thanks,
Wonkychair
Reputation Points: 10
Solved Threads: 0
Newbie Poster
wonkychair is offline Offline
1 posts
since May 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: Simulating a mouseclick?
Next Thread in Python Forum Timeline: strange dictionary definition/object instance problem





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC