#473: Add support for parameter file scripts --------------------------+------------------------------------------------- Reporter: hinder | Owner: eschnett Type: enhancement | Status: review Priority: minor | Milestone: Component: SimFactory | Version: Resolution: | Keywords: --------------------------+-------------------------------------------------
Comment (by hinder):
I had tried to do this in the past, but the Python syntax for "here- documents" never seemed to be as convenient as the Perl one. You need to provide a dictionary containing all your definitions, and if you want to compute one definition using a previous definition, this requires a lot of duplication. However, I have found a way to work around this by using the locals() function which returns a dictionary containing all the locally defined variables. This can then be used in the substitution. I'm attaching a Python version of test_rpar.