util

Module Contents

Functions

_setproctitle(title)
_setproctitle(title)
_resolve_name(name,package,level) Return the absolute name of the module to be imported.
import_module() Import a module.
load_class(uri,default=”gunicorn.workers.sync.SyncWorker”,section=”gunicorn.workers”)
get_username(uid) get the username for a user id
set_owner_process(uid,gid,initgroups=False) set user and group of workers processes
chown(path,uid,gid)
_waitfor(func,pathname,waitall=False)
_unlink(filename)
unlink(filename)
is_ipv6(addr)
parse_address(netloc,default_port=8000)
close_on_exec(fd)
set_non_blocking(fd)
close(sock)
closerange(fd_low,fd_high)
write_chunk(sock,data)
write(sock,data,chunked=False)
write_nonblock(sock,data,chunked=False)
write_error(sock,status_int,reason,mesg)
import_app(module)
getcwd()
http_date(timestamp=None) Return the current date and time formatted for a message header.
is_hoppish(header)
daemonize(enable_stdio_inheritance=False)
seed()
check_is_writeable(path)
to_bytestring(value,encoding=”utf8”) Converts a string argument to a byte string
has_fileno(obj)
warn(msg)
make_fail_app(msg)
split_request_uri(uri)
_setproctitle(title)
_setproctitle(title)
_resolve_name(name, package, level)

Return the absolute name of the module to be imported.

import_module()

Import a module.

The ‘package’ argument is required when performing a relative import. It specifies the package to use as the anchor point from which to resolve the relative import to an absolute import.

load_class(uri, default="gunicorn.workers.sync.SyncWorker", section="gunicorn.workers")
get_username(uid)

get the username for a user id

set_owner_process(uid, gid, initgroups=False)

set user and group of workers processes

chown(path, uid, gid)
_waitfor(func, pathname, waitall=False)
is_ipv6(addr)
parse_address(netloc, default_port=8000)
close_on_exec(fd)
set_non_blocking(fd)
close(sock)
closerange(fd_low, fd_high)
write_chunk(sock, data)
write(sock, data, chunked=False)
write_nonblock(sock, data, chunked=False)
write_error(sock, status_int, reason, mesg)
import_app(module)
getcwd()
http_date(timestamp=None)

Return the current date and time formatted for a message header.

is_hoppish(header)
daemonize(enable_stdio_inheritance=False)

Standard daemonization of a process. http://www.svbug.com/documentation/comp.unix.programmer-FAQ/faq_2.html#SEC16

seed()
check_is_writeable(path)
to_bytestring(value, encoding="utf8")

Converts a string argument to a byte string

has_fileno(obj)
warn(msg)
make_fail_app(msg)
split_request_uri(uri)