diff --git a/scripttease/lib/contexts.py b/scripttease/lib/contexts.py index 116ec7c..ebc8e5c 100644 --- a/scripttease/lib/contexts.py +++ b/scripttease/lib/contexts.py @@ -10,6 +10,7 @@ log = logging.getLogger(__name__) # Exports __all__ = ( + "load_variables", "Context", "Variable", ) @@ -85,6 +86,15 @@ class Context(object): return v + def append(self, variable): + """Append a variable to the context. + + :param variable: The variable to be added to the context. + :type variable: scripttease.lib.contexts.Variable + + """ + self.variables[variable.name] = variable + def mapping(self): """Get the context as a dictionary.