RSS Forums RSS

Adding tabs from plugins

Please support our Python advertiser: Programming Forums
Reply
Posts: 1
Reputation: wonkychair is an unknown quantity at this point 
Solved Threads: 0
wonkychair wonkychair is offline Offline
Newbie Poster

Adding tabs from plugins

  #1  
May 14th, 2008
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:

  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
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Other Threads in the Python Forum
Views: 360 | Replies: 0 | Currently Viewing: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 12:48 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC