it re-executes the code in the reloaded module *but* the globals() environment remains from the previous run(s). if you need a cleaner environment on reload, you need to do something like search through globals and delete everything not matching sublime's python builtins
also make sure to not start any threads after the first module load. you can do something like:
- Code: Select all
if not 'already' in globals():
globals()['already'] = True
do_init_stuff()