Methods
|
|
|
|
__contains__
|
__contains__ ( self, name )
Return a true value if name has a binding in context
|
|
__delitem__
|
__delitem__ ( self, name )
Remove any binding associated with name
|
|
__getitem__
|
__getitem__ ( self, name )
Lookup name and return an object
Exceptions
|
|
exceptions.NameNotFound( remainingName = name, resolvedObj = self )
|
|
|
__iter__
|
__iter__ ( self )
Return an iterator of the names present in the context
Note: must return names which are directly usable by _get()! That is,
ones which have already been passed through toName() and/or
self.schemeParser() .
|
|
__setitem__
|
__setitem__ (
self,
name,
object,
)
Bind object under name
|
|
_bind
|
_bind (
self,
name,
state,
)
|
|
_bind_nns
|
_bind_nns (
self,
name,
state,
)
|
|
_checkSupported
|
_checkSupported (
self,
name,
iface,
)
Exceptions
|
|
exceptions.NotAContext( "Unsupported interface", iface, resolvedObj = self, remainingName = name )
|
|
|
_contextNNS
|
_contextNNS ( self )
|
|
_deref
|
_deref (
self,
state,
name,
)
|
|
_get
|
_get (
self,
name,
retrieve=True,
)
Lookup name , returning NOT_FOUND if not found
If name doesn't exist, always return NOT_FOUND . Otherwise,
if retrieve is true, return the bound state.
If retrieve is false, you may return any value other than
NOT_FOUND . This is for optimization purposes, to allow you to
skip costly retrieval operations if a simple existence check will
suffice.
|
|
_getOb
|
_getOb (
self,
name,
default=NOT_FOUND,
)
|
|
_get_nns
|
_get_nns (
self,
name,
retrieve=1,
)
|
|
_mkref
|
_mkref (
self,
obj,
name,
)
|
|
_rename
|
_rename (
self,
old,
new,
)
|
|
_resolveComposite
|
_resolveComposite (
self,
name,
iface,
)
Exceptions
|
|
exceptions.NotAContext("Unsupported interface", iface, resolvedObj = ctx, remainingName = name [ 1 : ] )
|
|
|
_resolveLocal
|
_resolveLocal (
self,
name,
iface,
)
|
|
_resolveURL
|
_resolveURL (
self,
name,
iface,
)
|
|
_unbind
|
_unbind ( self, name )
|
|
_unbind_nns
|
_unbind_nns ( self, name )
|
|
bind
|
bind (
self,
name,
object,
)
Synonym for __setitem__, with attribute support
|
|
close
|
close ( self )
|
|
get
|
get (
self,
name,
default=None,
)
Lookup name and return an object, or default if not found
|
|
getURLContext
|
getURLContext (
klass,
parent,
scheme,
iface,
componentName,
**options,
)
|
|
has_key
|
has_key ( self, name )
Synonym for __contains__
|
|
info
|
info ( self )
Return a sequence of (name,refInfo) pairs
|
|
items
|
items ( self )
Return a sequence of (name,boundItem) pairs
|
|
keys
|
keys ( self )
Return a sequence of the names present in the context
|
|
lookup
|
lookup (
self,
name,
default=NOT_GIVEN,
)
Lookup name --> object; synonym for __getitem__
|
|
lookupLink
|
lookupLink ( self, name )
Return terminal link for name
Exceptions
|
|
exceptions.NameNotFound( remainingName = name, resolvedObj = self )
|
|
|
rename
|
rename (
self,
oldName,
newName,
)
Rename oldName to newName
Exceptions
|
|
exceptions.InvalidName( "Can't rename across naming systems", oldName, newName )
|
|
|
resolveToInterface
|
resolveToInterface (
self,
name,
iface=IBasicContext,
)
Exceptions
|
|
exceptions.InvalidName("Unknown scheme %s in %r" %( name.scheme, name ) )
|
|
|
unbind
|
unbind (
self,
name,
object,
)
Synonym for __delitem__
|
|