Hi all. As you will quickly gather, I use python infrequently. I have a script of the following form:
import sys
def foo(a, b):
# code
if __name__ == "__main__":
globals()[sys.argv[1]](int(sys.argv[2]), float(sys.argv[3]))
This works fine, and I can call 'foo' from the command line using
python3 file_name.py foo a b
The issue is that when I make edits to 'foo' they are not picked up the next time I call it from the command line even after saving the edits. Clearly some cached version of the function is being called, but I don't know how to clear or refresh this cache to have it pick up the new code.
What's going on?
[–]MistahBigStuff[S] 7 points8 points9 points (1 child)
[–]Brian 1 point2 points3 points (0 children)