Inheritance diagram for IPython.parallel.util:
some generic utilities for dealing with classes, urls, and serialization
Authors:
Bases: dict
Subclass of dict for attribute access to keys.
x.__init__(...) initializes x; see help(type(x)) for signature
D.clear() -> None. Remove all items from D.
D.copy() -> a shallow copy of D
dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v. v defaults to None.
D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.
D.has_key(k) -> True if D has a key k, else False
D.items() -> list of D’s (key, value) pairs, as 2-tuples
D.iteritems() -> an iterator over the (key, value) items of D
D.iterkeys() -> an iterator over the keys of D
D.itervalues() -> an iterator over the values of D
D.keys() -> list of D’s keys
D.pop(k[,d]) -> v, remove specified key and return the corresponding value. If key is not found, d is returned if given, otherwise KeyError is raised
D.popitem() -> (k, v), remove and return some (key, value) pair as a 2-tuple; but raise KeyError if D is empty.
D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
D.update(E, **F) -> None. Update D from dict/iterable E and F. If E has a .keys() method, does: for k in E: D[k] = E[k] If E lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
D.values() -> list of D’s values
D.viewitems() -> a set-like object providing a view on D’s items
D.viewkeys() -> a set-like object providing a view on D’s keys
D.viewvalues() -> an object providing a view on D’s values
Bases: dict
simple double-keyed subset of dict methods.
D.clear() -> None. Remove all items from D.
D.copy() -> a shallow copy of D
dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v. v defaults to None.
D.has_key(k) -> True if D has a key k, else False
D.items() -> list of D’s (key, value) pairs, as 2-tuples
D.iteritems() -> an iterator over the (key, value) items of D
D.iterkeys() -> an iterator over the keys of D
D.itervalues() -> an iterator over the values of D
D.keys() -> list of D’s keys
D.popitem() -> (k, v), remove and return some (key, value) pair as a 2-tuple; but raise KeyError if D is empty.
D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
D.update(E, **F) -> None. Update D from dict/iterable E and F. If E has a .keys() method, does: for k in E: D[k] = E[k] If E lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
D.values() -> list of D’s values
D.viewitems() -> a set-like object providing a view on D’s items
D.viewkeys() -> a set-like object providing a view on D’s keys
D.viewvalues() -> an object providing a view on D’s values
ensure that an object is ascii bytes
turn multi-ip interfaces ‘0.0.0.0’ and ‘*’ into connectable ones, based on the location (default interpretation of location is localhost).
turn multi-ip interfaces ‘0.0.0.0’ and ‘*’ into connectable ones, based on the location (default interpretation is localhost).
decorator for making functions appear as interactively defined. This results in the function being linked to the user_ns as globals() instead of the module globals().
boolean check for whether a string is a zmq url
pack up a function, args, and kwargs to be sent over the wire as a series of buffers. Any object whose data is larger than threshold will not have their data copied (currently only numpy arrays support zero-copy)
Selects and return n random ports that are available.
Serialize an object into a list of sendable buffers.
Parameters : | obj : object
threshold : float
|
---|---|
Returns : | (‘pmd’, [bufs]) : :
|
Relay interupt/term signals to children, for more solid process cleanup.
split a zmq url (tcp://ip:port) into (‘tcp’,’ip’,’port’).
unpack f,args,kwargs from buffers packed by pack_apply_message() Returns: original f,args,kwargs
reconstruct an object serialized by serialize_object from data buffers.
validate a url for zeromq
validate a potentially nested collection of urls.