When I pass the options in the program (a computational biology experiment) I usually pass them through a .py file.
So I have this .py file that reads like:
Then I execute the file and get the data. Since the program is all on my machine and no one else has access to it, it is secure in a trivial way.
I can also write a similar file very easily:
I want to pass a function as one of the parameters:
And of course in the real experiment the function Pippo will be much more complex. And different from experiment to experiment.
But what I am unable to do is to write the function automatically. In short, I don't know how to generalize the write options function to keep on writing the options, if one of the options is a function. I could, of course, copy the original file, but this is inelegant, inefficient (because it contains a lot of extra options that are not being used), and generally does not solve the question.
How do you get python to write down the code of a function, as it writes down the value of a variable?