I am trying to hot swap a file in python. I am creating a game that takes a really long time to load. But I don't want to reload it every time. I am trying to change some code while the programme is in runtime. For example: I want to change this:
while True:
print("Hello")
to this while in runtime:
while True:
print("Hello World")
I looked hot swapping up for python and all of them are answers that I am not looking for. All the other answers change modules. I want to change the current file. Like java in eclipse. Please help!