Re: Python plug-in Frameworks like Eclipse RCP...

2005-04-02 Thread Diez B. Roggisch
Jim Hargrave wrote:

> Hum, maybe my question was too specific. What I would really like to
> know is what is the best way to implement a Python application with a
> pluggable architecture. In particular, I would like to use wxPython and
> have plug ins automatically register themselves with the GUI by adding
> themselves to the mean or adding a tab. Again this is much like Eclipse
> RCP - but forget that part :-)


This is close to beeing trivial in python - just utilize __import__ to
dynamically load modules that shall act as plugins. These modules then only
have to follow a sort of protocol - lets say you have a module called

pluginloader.py

that has a register-function. The loaded module could import pluginloader
and register itself, or a class defined in itself. Like this

-plugin_example.py-

import pluginloader


class ExamplePlugin(pluginloader.PluginBase):
 def __init__(self,...):
 



pluginloader.register(ExamplePlugin())





-- 
Regards,

Diez B. Roggisch
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python plug-in Frameworks like Eclipse RCP...

2005-04-01 Thread Jim Hargrave
Hum, maybe my question was too specific. What I would really like to 
know is what is the best way to implement a Python application with a 
pluggable architecture. In particular, I would like to use wxPython and 
have plug ins automatically register themselves with the GUI by adding 
themselves to the mean or adding a tab. Again this is much like Eclipse 
RCP - but forget that part :-)

J

Jim Hargrave wrote:
Eclipse provides a very nice application framework which supports 
plug-ins. It's easy to dynamically add new functionality, menu items, 
property editors, options etc.. using a combination of XML and Java code.

Is there a similar framework for Python? If not any hints on how such a 
framework would be implemented?

I'm building a client side tool using Python/wxPython for our 
translators and would like to have a pluggable architecture similar to 
Eclipse RCP

thanks!
--
http://mail.python.org/mailman/listinfo/python-list


Python plug-in Frameworks like Eclipse RCP...

2005-03-30 Thread Jim Hargrave
Eclipse provides a very nice application framework which supports 
plug-ins. It's easy to dynamically add new functionality, menu items, 
property editors, options etc.. using a combination of XML and Java code.

Is there a similar framework for Python? If not any hints on how such a 
framework would be implemented?

I'm building a client side tool using Python/wxPython for our 
translators and would like to have a pluggable architecture similar to 
Eclipse RCP

thanks!
--
http://mail.python.org/mailman/listinfo/python-list