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

All Samples(10)  |  Call(7)  |  Derive(0)  |  Import(3)

src/9/m/9ML-0.1.0/nineml/abstraction_layer/readers/xml_reader.py   9ML(Download)
    def load_subnode(self, subnode):
        namespace = subnode.get('namespace')
        component = nineml.utility.filter_expect_single( self.components, 
                                          lambda c: c.name==subnode.get('node'))
        return namespace, component
        if component_name == None:
            key_func = lambda c: loader.component_srcs[c] == filename
            return nineml.utility.filter_expect_single(loader.components, key_func)
 
        else:
            key_func = lambda c: c.name == component_name 
            return nineml.utility.filter_expect_single(loader.components, key_func) 

src/9/m/9ML-0.1.0/nineml/abstraction_layer/component_modifiers/component_modifier.py   9ML(Download)
"""This file contains utility classes for modifying components"""
 
from nineml.abstraction_layer.visitors import ExpandPortDefinition
from nineml.utility import filter_expect_single
from nineml.abstraction_layer.util import check_flat_component
 
        # Remove it from the list of ports:
        port = filter_expect_single( component.analog_ports, 
                                     lambda ap: ap.name==port_name)
        component._analog_ports.remove( port  )
 
        # Find the old port:
        port = filter_expect_single( component.analog_ports, 
                                     lambda ap: ap.name==old_port_name)
        port._name = new_port_name
 
        # Find the old port:
        port = filter_expect_single( component.analog_ports, 
                                     lambda ap: ap.name==port_name)
        component._analog_ports.remove( port  )

src/9/m/9ML-0.1.0/nineml/abstraction_layer/component/componentqueryer.py   9ML(Download)
#from namespaceaddress import NamespaceAddress
#import nineml.utility
from nineml.utility import filter_expect_single
 
 
    def regime(self, name=None,):
        """Find a regime in the component by name"""
        assert isinstance(name, basestring)
 
        return filter_expect_single( self.component.regimes, 

src/9/m/9ML-0.1.0/test/unit/nineml_test/utility/INIT_test.py   9ML(Download)
        #from nineml.utility import filter_expect_single
 
        from nineml.utility import filter_expect_single
        from nineml.exceptions import NineMLRuntimeError