system_interface#

tools.system_interface.app_path(app)[source]#

DESCRIPTION:

This function invokes the POSIX UNIX command function to retrieve the path to the application specified upon entry.

Parameters:
app: str

A Python string specifying the name of the application for which the path is to be determined.

Returns:
path: Union[str, None]

A Python string specifying the path determined for the application name specified upon entry; if no path for the respective application name can be determined NoneType is returned.

Return type:

Optional[str]

tools.system_interface.chown(path, user, group=None)[source]#

DESCRIPTION:

This function changes the ownership credentials for the specified file path.

Parameters:
path: str

A Python string specifying the file path for which to change the ownership credentials.

user: str

A Python string specifying the host name for the user to be used for the file path ownership credentials.

Return type:

None

tools.system_interface.get_app_path(app)[source]#

DESCRIPTION:

This function collects the path for the specified application; if the path cannot be determined, NoneType is returned.

Parameters:
app: str

A Python string specifying the name of the application for which to return the respective path.

Returns:
app_path: Union[str, None]

A Python string specifying the path to the application name provided upon entry; if the application path cannot be determined, this value is NoneType.

Return type:

Optional[str]

tools.system_interface.get_pid()[source]#

DESCRIPTION:

This function returns the current process integer identification.

Returns:
pid: int

A Python integer specifying the current process integer identification.

Return type:

int

tools.system_interface.sleep(seconds=0)[source]#

DESCRIPTION:

This function allows specific calling applications to suspend execution for a specified number of seconds.

Return type:

None

tools.system_interface.task_exit()[source]#

DESCRIPTION:

This function (gracefully) exits the respective application and returns a status code of 0 (i.e., success).

Return type:

None

tools.system_interface.user()[source]#

DESCRIPTION:

This method returns the login name of the user.

Returns:
username: str

A Python string specifying the login name of the user.

Return type:

str