| | |
Adding tabs from plugins
![]() |
•
•
Join Date: May 2008
Posts: 1
Reputation:
Solved Threads: 0
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:
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
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)
def tab_setup(self): self.plugin_name = wx.Panel(self.notebook_1, -1) 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
![]() |
Other Threads in the Python Forum
- Previous Thread: Simulating a mouseclick?
- Next Thread: strange dictionary definition/object instance problem
| Thread Tools | Search this Thread |
alarm ansi anydbm app assignment backend beginner binary bluetooth character cipher cmd coordinates customdialog cx-freeze data decimals development directory dynamic exe feet file float format function generator getvalue gnu graphics halp handling heads homework http ideas input ip itunes java keycontrol leftmouse line linux list lists loop maintain maze millimeter module mouse number numbers output parsing path pointer prime programming progressbar push py2exe pygame pymailer python queue random recursion recursive schedule screensaverloopinactive script slicenotation sqlite ssh statistics string strings sudokusolver text thread time tlapse tuple ubuntu unicode url urllib urllib2 variable ventrilo vigenere web webservice wikipedia write wxpython xlib xlwt





