I'm not sure if there is a way to do this. I use TextWrangle to write my Python script and then use terminal to run it. So, I just run something like python code.py
. In my script, I'm doing some data analysis where I create variables, but then I want to plot a few different things after running the script. So basically, is there a way I can enter a way to enter into a dynamic python mode so I can then plot different things or add more code. I would rather not just add more lines in the script since it takes time to run the script.
For example, at the end of the script, I have created the variables time, amp1, amp2, phase1, phase2, freq1, freq2
. And I may want to plot different things together like time
vs amp1
or any other combination. In terminal, if I type python
it will enter into python mode where I could type out the entire script again and then plot different things and keep all the variables saved, but is there a way to keep all the variables saves locally after running the script?