util Module

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.get_maxfd()[source]
gaffer.util.getcwd()[source]

Returns current path, try to use PWD env first

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

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

gaffer.util.parse_address(netloc, default_port=8000)[source]
gaffer.util.setproctitle_(title)[source]
gaffer.util.substitute_env(s, env)[source]

Previous topic

pidfile Module

Next topic

tornado_pyuv Module

This Page