pip install pyexpander
expander.py
script under <inst-dir>/Scripts
. test.txt
): first $py(num = 42) line second $py(txt = 'Hello world') line This is the fourth line in the output. The number is $(num) and the text is $(txt).
C:\users\rene> expander test.txt
first line second line This is the fourth line in the output. The number is 42 and the text is Hello world.