glib Constantsthe built-in constants of the glib moduleSynopsisDescriptionGlib IO Condition ConstantsThe IO Condition constants are a set of bit-flags that specify a
condition to watch for on an event source.glib.IO_INThere is data to readglib.IO_OUTData can be written (without blocking).glib.IO_PRIThere is urgent data to read.glib.IO_ERRError condition.glib.IO_HUPHung up (the connection has been broken, usually for
pipes and sockets).glib.IO_NVALInvalid request. The file descriptor is not
open.Glib Priority ConstantsThe Priority constants specify glib.PRIORITY_HIGHUse this for high priority event sources.glib.PRIORITY_DEFAULTUse this for default priority event sources. This
priority is used when adding timeout functions with the glib.timeout_add()
function. This priority is also used for events from the X
server.glib.PRIORITY_HIGH_IDLEUse this for high priority idle functions. For example,
glib.PRIORITY_HIGH_IDLE + 10 is used for resizing operations;
and, glib.PRIORITY_HIGH_IDLE + 20, for redrawing
operations. (This is done to ensure that any pending resizes are
processed before any pending redraws, so that widgets are not
redrawn twice unnecessarily.)glib.PRIORITY_DEFAULT_IDLEUse this for default priority idle functions. This
priority is used when adding idle functions with the glib.idle_add()
function.glib.PRIORITY_LOWUse this for very low priority background
tasks.Glib Spawn Flag ConstantsThe Spawn Flag constants are a set of bit-flags that can be
passed to the glib.spawn_async()
function.glib.SPAWN_LEAVE_DESCRIPTORS_OPENthe parent's open file descriptors will be inherited by
the child; otherwise all descriptors except stdin/stdout/stderr will be
closed before calling exec() in the child.glib.SPAWN_DO_NOT_REAP_CHILDthe child will not be automatically reaped; you must
call waitpid() or handle SIGCHLD
yourself, or the child will become a zombie.glib.SPAWN_SEARCH_PATHargv[0] need not be an absolute
path, it will be looked for in the user's PATH.glib.SPAWN_STDOUT_TO_DEV_NULLthe child's standard output will be discarded, instead
of going to the same location as the parent's standard output.glib.SPAWN_STDERR_TO_DEV_NULLthe child's standard error will be discarded.glib.SPAWN_CHILD_INHERITS_STDINthe child will inherit the parent's standard input (by
default, the child's standard input is attached to /dev/null).glib.SPAWN_FILE_AND_ARGV_ZEROthe first element of argv is the
file to execute, while the remaining elements are the actual argument vector
to pass to the file. Normally glib.spawn_async()
uses argv[0] as the file to execute, and passes all
of argv to the child.Glib User Directory ConstantsThe User Directory constants are integer values that are currently used only as arguments to
glib.get_user_special_dir()
function. See function documentation for details.glib.USER_DIRECTORY_DESKTOPthe user's Desktop directoryglib.USER_DIRECTORY_DOCUMENTSthe user's Documents directoryglib.USER_DIRECTORY_DOWNLOADthe user's Downloads directoryglib.USER_DIRECTORY_MUSICthe user's Music directoryglib.USER_DIRECTORY_PICTURESthe user's Pictures directoryglib.USER_DIRECTORY_PUBLIC_SHAREthe user's shared directoryglib.USER_DIRECTORY_TEMPLATESthe user's Templates directoryglib.USER_DIRECTORY_VIDEOSthe user's Movies directoryGlib Version ConstantsThe Version constants specify the version of
Glib used by PyGObject as a 3-tuple containing the major,
minor and patch release numbers.glib.glib_versionA 3-tuple containing (major, minor, patch) release
numbers of glib.glib.pyglib_versionA 3-tuple containing (major, minor, patch) release
numbers of the python bindings.