b.py.jinja2
```python
from functools import namedtuple
specific_var = namedtuple('specific_var', ('key1', 'key2'))
SPC_VAR = specific_var(key1='{{ value1 }}', key2='{{ value2 }}')
```
a.py```python
import os, sys
from jinja2 import Template
if __name__ == "__main__":
value1 = sys.argv[1]
value2 = sys.argv[2]
with open('b.py.jinja2', 'r') as fp:
data = fp.read()
template = Template(data)
dst_data = template.render(value1=value1, value2=value2)
with open('
b.py', 'w') as fp:
fp.write(dst_data)
```
```shell
➜ pip install jinja2
➜ Python python
a.py foo bar
➜ Python ipython #
c.pyPython 3.6.8 (... ... IPython 7.6.1 ... Type '?' for help.
In [1]: from b import SPC_VAR
In [2]: SPC_VAR.key1
Out[2]: 'foo'
In [3]: SPC_VAR.key2
Out[3]: 'bar'
In [4]:
```