You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Difficult to specify environment variables for a python-form session. #3
When running a FORM code with python-form that has such a pragma e.g.:
#: MaxTermsize 1M
Then it is not interpreted correctly, in the sense that it is not updating that environment value for FORM when executing the code.
This is likely because a FORM session/kernel has already been started by then and it cannot update this option afterwards.
But then, what would be nice is to be able to update these FORM environment variables as options to the open(...) function.
For now I can make sure to specify the path of my FORM interpreter to one where I have an appropriate form.set file, but it'd be more convenient to be able to supply this with python options as I suggested.
Thank you for your suggestion. To do this, init.frm must be temporarily copied to somewhere and dynamically rewritten in such a way that such options are supplied to the input file, which is passed to FORM here.
Or, for now, maybe you can just set form.FormLink._INIT_FRM to your favorite file, which should contain the structure similar to init.frm in order to handle pipes. Including (= #include) the file of the original form.FormLink._INIT_FRM may work (I haven't tested).
By the way, the necessity of init.frm in the startup is the reason why I made form-dev/form#265. Using stdin for the input can give more flexibility to this library.
Activity
tueda commentedon Jul 25, 2022
Thank you for your suggestion. To do this,
init.frmmust be temporarily copied to somewhere and dynamically rewritten in such a way that such options are supplied to the input file, which is passed to FORM here.Or, for now, maybe you can just set
form.FormLink._INIT_FRMto your favorite file, which should contain the structure similar toinit.frmin order to handle pipes. Including (=#include) the file of the originalform.FormLink._INIT_FRMmay work (I haven't tested).By the way, the necessity of
init.frmin the startup is the reason why I made form-dev/form#265. Using stdin for the input can give more flexibility to this library.