Envisage and plugins loading

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Envisage and plugins loading

Lic. José M. Rodriguez Bacallao
Hi folks, I am using envisage for my application because of its
plugins capabilities. Right now I am doing something like this to load
my plugins:

In run.py

def get_plugins():
    from enthought.envisage.core_plugin import CorePlugin
    from imagis.plugins.workbench.workbench_plugin import WorkbenchPlugin
    from imagis.plugins.viewer.viewer_plugin import ViewerPlugin

    return [CorePlugin, WorkbenchPlugin, ViewerPlugin]

# Create an application with the specified plugins.
imagis = iMagisApplication(
    id = 'iMagis',
    plugins = get_plugins(),
)

imagis.run()

is there any other way in envisage to load my plugins, for example,
read the list of plugins from a config file like django framework?

--
Lic. José M. Rodriguez Bacallao
Centro de Biofisica Medica
-----------------------------------------------------------------
Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo mismo.

Recuerda: El arca de Noe fue construida por aficionados, el titanic
por profesionales
-----------------------------------------------------------------
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Envisage and plugins loading

Robert Kern
On Thu, Mar 18, 2010 at 2:18 PM, Lic. José M. Rodriguez Bacallao
<[hidden email]> wrote:

> Hi folks, I am using envisage for my application because of its
> plugins capabilities. Right now I am doing something like this to load
> my plugins:
>
> In run.py
>
> def get_plugins():
>    from enthought.envisage.core_plugin import CorePlugin
>    from imagis.plugins.workbench.workbench_plugin import WorkbenchPlugin
>    from imagis.plugins.viewer.viewer_plugin import ViewerPlugin
>
>    return [CorePlugin, WorkbenchPlugin, ViewerPlugin]
>
> # Create an application with the specified plugins.
> imagis = iMagisApplication(
>    id = 'iMagis',
>    plugins = get_plugins(),
> )
>
> imagis.run()
>
> is there any other way in envisage to load my plugins, for example,
> read the list of plugins from a config file like django framework?

You can certainly write your get_plugins() function to do that.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Envisage and plugins loading

Lic. José M. Rodriguez Bacallao
yes, I know that but, in envisage, there is something to do that?
In ETS web site there is a brief description about a plugin_definition
file but I don't understand what it means.

On Thu, Mar 18, 2010 at 3:22 PM, Robert Kern <[hidden email]> wrote:

> On Thu, Mar 18, 2010 at 2:18 PM, Lic. José M. Rodriguez Bacallao
> <[hidden email]> wrote:
>> Hi folks, I am using envisage for my application because of its
>> plugins capabilities. Right now I am doing something like this to load
>> my plugins:
>>
>> In run.py
>>
>> def get_plugins():
>>    from enthought.envisage.core_plugin import CorePlugin
>>    from imagis.plugins.workbench.workbench_plugin import WorkbenchPlugin
>>    from imagis.plugins.viewer.viewer_plugin import ViewerPlugin
>>
>>    return [CorePlugin, WorkbenchPlugin, ViewerPlugin]
>>
>> # Create an application with the specified plugins.
>> imagis = iMagisApplication(
>>    id = 'iMagis',
>>    plugins = get_plugins(),
>> )
>>
>> imagis.run()
>>
>> is there any other way in envisage to load my plugins, for example,
>> read the list of plugins from a config file like django framework?
>
> You can certainly write your get_plugins() function to do that.
>
> --
> Robert Kern
>
> "I have come to believe that the whole world is an enigma, a harmless
> enigma that is made terrible by our own mad attempt to interpret it as
> though it had an underlying truth."
>  -- Umberto Eco
> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev
>



--
Lic. José M. Rodriguez Bacallao
Centro de Biofisica Medica
-----------------------------------------------------------------
Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo mismo.

Recuerda: El arca de Noe fue construida por aficionados, el titanic
por profesionales
-----------------------------------------------------------------
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Envisage and plugins loading

Robert Kern
On Thu, Mar 18, 2010 at 2:35 PM, Lic. José M. Rodriguez Bacallao
<[hidden email]> wrote:
> yes, I know that but, in envisage, there is something to do that?

No. There isn't much call for it.

> In ETS web site there is a brief description about a plugin_definition
> file but I don't understand what it means.

It's not relevant.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Envisage and plugins loading

Lic. José M. Rodriguez Bacallao
ok, I will do it myself, thanks.

On Thu, Mar 18, 2010 at 4:53 PM, Robert Kern <[hidden email]> wrote:

> On Thu, Mar 18, 2010 at 2:35 PM, Lic. José M. Rodriguez Bacallao
> <[hidden email]> wrote:
>> yes, I know that but, in envisage, there is something to do that?
>
> No. There isn't much call for it.
>
>> In ETS web site there is a brief description about a plugin_definition
>> file but I don't understand what it means.
>
> It's not relevant.
>
> --
> Robert Kern
>
> "I have come to believe that the whole world is an enigma, a harmless
> enigma that is made terrible by our own mad attempt to interpret it as
> though it had an underlying truth."
>  -- Umberto Eco
> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev
>



--
Lic. José M. Rodriguez Bacallao
Centro de Biofisica Medica
-----------------------------------------------------------------
Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo mismo.

Recuerda: El arca de Noe fue construida por aficionados, el titanic
por profesionales
-----------------------------------------------------------------
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev