I am trying to find a way to run a command line script in Jupyter notebook using a variable as one of the input arguments.
For now I am able to do the following:
%run '/global/scripts/plot_modes.py' '0001' .5 0.5
But, I want to be able to do the following in order to throw this into a loop.
suffix = '0001'
%run '/global/scripts/plot_modes.py' suffix .5 0.5
I've tried converting the suffix variable to an integer and all other types of things but an error only appears when the variable takes the place of the '0001' input.
I've searched online but only seem to find how to get argument outputs as variables and not how to load in a variable as the input argument. The other alternative would be to convert the script into a function but this is turning out to be very messy. Any tips or leads are welcome!