Macros
Macros are used to provide value as command argument.
from devparrot.core.command import Macro @Macro def hello: return "hello world"
Your macro can be use this way:
helloworld2 %hello
Macro can also take arguments:
from devparrot.core.command import Macro @Macro def hello(name): return "hello %s"%name
And be used :
helloworld2 %hello(me)
Macro's results are used without transformation. So your macro has to return a python object compatible with the associated constraints.
For example, if a macro is used to reference a document, it should a Python document object. It must not return the document title. (Contrary to alias, who will use the document title to generate new user input)