For example, if I have a file called test.py
which looks like the following:
a = 3
and I run from cmd:
python -i test.py
, and then just type a
, I get returned 3
. Let's say in the actual test.py
I change the value of a
to 4
.
Now we have
a = 4
I save, when I go back to the cmd
(I never closed it), and type a
, its still 3
. I have to restart the terminal, do the python -i test.py
again to get the updated version. This is why I want to know if there's a way to reload
, or update
cmd of the current changes.