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
v defaults to None.
If key is not found, d is returned if given, otherwise KeyError is raised
2-tuple; but raise KeyError if D is empty.
If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and 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]
Bases: dict
simple double-keyed subset of dict methods.
v defaults to None.
2-tuple; but raise KeyError if D is empty.
If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and 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]
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.