|
|
@ -10,6 +10,7 @@ log = logging.getLogger(__name__) |
|
|
|
# Exports |
|
|
|
# Exports |
|
|
|
|
|
|
|
|
|
|
|
__all__ = ( |
|
|
|
__all__ = ( |
|
|
|
|
|
|
|
"load_variables", |
|
|
|
"Context", |
|
|
|
"Context", |
|
|
|
"Variable", |
|
|
|
"Variable", |
|
|
|
) |
|
|
|
) |
|
|
@ -85,6 +86,15 @@ class Context(object): |
|
|
|
|
|
|
|
|
|
|
|
return v |
|
|
|
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): |
|
|
|
def mapping(self): |
|
|
|
"""Get the context as a dictionary. |
|
|
|
"""Get the context as a dictionary. |
|
|
|
|
|
|
|
|
|
|
|