query2457%python.module
fault.system

High-level system inquiries for user information and environment derived paths.

All information is retrieved from the system when invoked.

os
import

operator0
import

tools0
import

files0
import

_path0
data

_path = tools.cachedcalls(16)(tools.compose(operator.methodcaller('delimit'), files.Path.from_absolute))

_dirs0
data

_dirs = tools.cachedcalls(2)(operator.methodcaller('split', os.pathsep))

paths0
function
files.Path

paths()

Select paths present in the PATH variable.

executables0
function
files.Path

executables(exename)

Select executable paths from the environment, PATH.

Iterate over the directories listed in PATH and yield paths that exist when the given exename is extended on the directory.

The produced files.Path instances may refer to files of any type. Paths referring to broken links will not be included.

home516%
function
files.Path

home()

Retrieve the user's home directory from the environment, HOME.

If the environment variable is not set, the pw_dir field will be retrieved using pwd.

username0
function
str

username()

Retrieve the user's name.

usertitle0
function
str

usertitle()

Retrieve the user's title; the long name associated with the user.

The pw_gecos field is retrieved using pwd without modification. If the system has no such concept or it cannot be resolved, None is returned.

shell0
function
files.Path

shell()

Retrieve the path to the user's login shell.

If the system has no such concept or it cannot be resolved, None is returned.

hostname325%
function
str

hostname()

Retrieve the hostname using the POSIX gethostname(2) call.

frequency325%
function
int

frequency()

Retrieve the clock ticks necessary for calculating processing usage from the POSIX sysconf call with SC_CLK_TCK.

platform130%
function

platform()

Create an execution.Platform instance using the environment.