I'm working in the vscode built in terminal and calling functions written into a script I'm calling directly from. I've got my cwd in the folder and imported the script in. For some reason, the terminal can't see when I update the script, forcing me to close the terminal and open a new one in order to run the code with the changes I've made, is there a way to make it update automatically without having to refresh the terminal? I want to avoid retyping the commands to get my cwd in the right folder and importing the script every time I make a change to a function.
I'm calling the script directly from the terminal. So for example, I already have the script written and I'm in the terminal, I'm entering the commands:
>>>import sys
>>>sys.path.append('functions')
>>>import Binomials as bn
After performing these commands in the terminal, I go back into the script 'Binomials' and add a new function 'ExpectedVals', save, and then go back to the terminal and enter:
>>>bn.ExpectedVals(2, 4, .6)
To which the console responds
AttributeError: module 'Binomials' has no attribute 'ExpectedValls'
Refreshing my terminal resolves the issue as it updates to see the newly added function and it works perfectly fine. However, this requires me to re-enter the first set of commands to get into the correct cwd and load the script. Is there a way to get the terminal to be able to see the updates without needing to open a new terminal?