Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(11)  |  Call(5)  |  Derive(0)  |  Import(6)
A trait type used to access services.

Note that this is a trait *type* and hence does *NOT* have traits itself
(i.e. it does *not* inherit from 'HasTraits').

src/c/o/connectomeviewer-HEAD/cviewer/plugins/bindings/bindings_plugin.py   connectomeviewer(Download)
from envisage.api import Plugin
from traits.api import List
from envisage.api import Service
 
# Logging imports
    name = 'Connectome File Bindings'
 
    mycfile = Service('cviewer.plugins.cff2.cfile.CFile')
 
    #analyze_node = Service('cviewer.plugins.analysis.analysis_node.AnalysisNode')

src/c/o/connectomeviewer-HEAD/cviewer/plugins/nbs/nbs_plugin.py   connectomeviewer(Download)
from envisage.api import Plugin
from traits.api import List
from envisage.api import Service
 
# Logging imports

src/c/o/connectomeviewer-HEAD/cviewer/plugins/codeoracle/oracle_plugin.py   connectomeviewer(Download)
# Enthought library imports
from envisage.api import Plugin
from envisage.api import Service
from traits.api import List
 

src/c/o/connectomeviewer-HEAD/cviewer/plugins/cmp/cmp_plugin.py   connectomeviewer(Download)
from envisage.api import Plugin
from traits.api import List
from envisage.api import Service
 
# Logging imports

src/e/n/envisage-4.4.0/envisage/tests/service_test_case.py   envisage(Download)
""" Tests for the 'Service' trait type. """
 
 
# Enthought library imports.
from envisage.api import Application, Plugin, Service
        class PluginB(Plugin):
            id = 'B'
            foo = Service(Foo)
 
        a = PluginA()
        class Bar(HasTraits):
            foo = Service(Foo)
 
        # We should get an exception because the object does not have an
        # 'service_registry' trait.

src/e/n/envisage-HEAD/envisage/tests/service_test_case.py   envisage(Download)
""" Tests for the 'Service' trait type. """
 
 
# Enthought library imports.
from envisage.api import Application, Plugin, Service
        class PluginB(Plugin):
            id = 'B'
            foo = Service(Foo)
 
        a = PluginA()
        class Bar(HasTraits):
            foo = Service(Foo)
 
        # We should get an exception because the object does not have an
        # 'service_registry' trait.