Steven D'Aprano schrieb:
>> How do I do that at runtime with Python?
>
> Untested:
[Code]
> Hope this is useful.
Very, very, very useful. Works like a charm, just like that. Thanks a
whole bunch!
Kind regards,
Johannes
--
"Meine Gegenklage gegen dich lautet dann auf bewusste Verlogenheit,
ver
In article <75akp8f17g29...@mid.dfncis.de>,
Johannes Bauer wrote:
>
>the GUI application should now browse the plugin directory and read
>those plugin python files and somehow incorporate (i.e. discover what
>modules are there, instanciate, etc.)
>
>How do I do that at runtime with Python?
You m
Ulrich Eckhardt wrote:
> Johannes Bauer wrote:
> > What I'd like to add: I want the GUI users to supply plugin scripts,
> > i.e. offer some kind of API. That is, I want the user to write short
> > Python pieces which look something like
> >
> > import guiapp
> >
> > class myplugin():
> > def __i
Hi,
I did this a few times and put the code that loads the plugins in
the __init__.py of the plugin directory. You then do not have to
do the path stuff.
You can also make a rule that the class defined in each
plugin module should be a certain name, for example the same
name as the module (but st
On Thu, 23 Apr 2009 09:47:56 +0200, Johannes Bauer wrote:
> Hello group,
>
> I'm developing a GUI application in Python and having a blast so far :-)
>
> What I'd like to add: I want the GUI users to supply plugin scripts,
> i.e. offer some kind of API. That is, I want the user to write short
>
Johannes Bauer wrote:
> What I'd like to add: I want the GUI users to supply plugin scripts,
> i.e. offer some kind of API. That is, I want the user to write short
> Python pieces which look something like
>
> import guiapp
>
> class myplugin():
> def __init__(self):
> guiapp.add_menu("foobar")
>
Hello group,
I'm developing a GUI application in Python and having a blast so far :-)
What I'd like to add: I want the GUI users to supply plugin scripts,
i.e. offer some kind of API. That is, I want the user to write short
Python pieces which look something like
import guiapp
class myplugin():