Warning
This documentation is for an old version of IPython. You can find docs for newer versions here.
Module: parallel.util¶
Some generic utilities for dealing with classes, urls, and serialization.
2 Classes¶
16 Functions¶
-
IPython.parallel.util.log_errors(f, self, *args, **kwargs)¶ decorator to log unhandled exceptions raised in a method.
For use wrapping on_recv callbacks, so that exceptions do not cause the stream to be closed.
-
IPython.parallel.util.is_url(url)¶ boolean check for whether a string is a zmq url
-
IPython.parallel.util.validate_url(url)¶ validate a url for zeromq
-
IPython.parallel.util.validate_url_container(container)¶ validate a potentially nested collection of urls.
-
IPython.parallel.util.split_url(url)¶ split a zmq url (tcp://ip:port) into (‘tcp’,’ip’,’port’).
-
IPython.parallel.util.disambiguate_ip_address(ip, location=None)¶ turn multi-ip interfaces ‘0.0.0.0’ and ‘*’ into a connectable address
Explicit IP addresses are returned unmodified.
Parameters: ip : IP address
An IP address, or the special values 0.0.0.0, or *
location: IP address, optional
A public IP of the target machine. If location is an IP of the current machine, localhost will be returned, otherwise location will be returned.
-
IPython.parallel.util.disambiguate_url(url, location=None)¶ turn multi-ip interfaces ‘0.0.0.0’ and ‘*’ into connectable ones, based on the location (default interpretation is localhost).
This is for zeromq urls, such as
tcp://*:10101.
-
IPython.parallel.util.interactive(f)¶ 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().
-
IPython.parallel.util.select_random_ports(n)¶ Selects and return n random ports that are available.
-
IPython.parallel.util.signal_children(children)¶ Relay interupt/term signals to children, for more solid process cleanup.
-
IPython.parallel.util.generate_exec_key(keyfile)¶
-
IPython.parallel.util.integer_loglevel(loglevel)¶
-
IPython.parallel.util.connect_logger(logname, context, iface, root='ip', loglevel=10)¶
-
IPython.parallel.util.connect_engine_logger(context, iface, engine, loglevel=10)¶
-
IPython.parallel.util.local_logger(logname, loglevel=10)¶
-
IPython.parallel.util.set_hwm(sock, hwm=0)¶ set zmq High Water Mark on a socket
in a way that always works for various pyzmq / libzmq versions.
