volttron.platform.lib package¶
Subpackages¶
Submodules¶
volttron.platform.lib.kwonlyargs module¶
Support functions for implementing keyword-only arguments.
This module is designed to make it easy to support keyword-only arguments in Python 2.7 while providing the same kind of exceptions one would see with Python 3.x.
Basic usage:
def foo(arg1, *args, **kwargs):
# Use required context manager to convert KeyError exceptions
# to TypeError with an appropriate message.
with required:
arg2 = kwargs.pop('arg2')
arg3 = kwargs.pop('arg3')
# Provide a default to pop for optional arguments
arg4 = kwargs.pop('arg4', 'default value')
# Include the next line to disallow additional keyword args
assertempty(kwargs)
volttron.platform.lib.prctl module¶
Python interface to Linux process control mechanism.
Exports prctl system call.
See also prctl(2).
-
volttron.platform.lib.prctl.
prctl
(option, *args)[source]¶ Perform control operations on a process using prctl(2).
Perform control operations on a process by passing in one of the PR_GET_* or PR_SET_* options and any additional arguments as specified by the prctl documentation. The result varies based on the option. An OSError exception is raised on error.
See also prctl(2).