util Module

gaffer.util.bind_sockets(addr, backlog=128, allows_unix_socket=False)[source]
gaffer.util.bytes2human(n)[source]

Translates bytes into a human repr.

gaffer.util.bytestring(s)[source]
gaffer.util.check_gid(val)[source]

Return a gid, given a group value

If the group value is unknown, raises a ValueError.

gaffer.util.check_uid(val)[source]

Return an uid, given a user value. If the value is an integer, make sure it’s an existing uid.

If the user value is unknown, raises a ValueError.

gaffer.util.daemonize()[source]

Standard daemonization of a process.

gaffer.util.from_nanotime(n)[source]

convert from nanotime to seconds

gaffer.util.getcwd()[source]

Returns current path, try to use PWD env first

gaffer.util.hostname()[source]
gaffer.util.is_ipv6(addr)[source]
gaffer.util.is_ssl(url)[source]
gaffer.util.nanotime(s=None)[source]

convert seconds to nanoseconds. If s is None, current time is returned

gaffer.util.ord_(c)[source]
gaffer.util.parse_address(netloc, default_port=8000)[source]
gaffer.util.parse_job_name(name, default='default')[source]
gaffer.util.parse_signal_value(sig)[source]
gaffer.util.parse_ssl_options(client_options)[source]
gaffer.util.setproctitle_(title)[source]
gaffer.util.substitute_env(s, env)[source]