Reload required on script update?

I found two solutions to this.

First, delete the module from sys.modules and reload:

import sys
def reload(module_name):
    # Delete the module from sys.modules
    if module_name in sys.modules:
        del sys.modules[module_name]
reload('target_module')
# now load the module
import target_module
# or something inside
from target_module import thing

Second (the better option in most cases), hold Ctrl + Shift + Alt while clicking the button to force the engine to reload. Button Click Modes: Reload Engine

1 Like