21
21
def _reloader_thread(modification_callback):
22
22
"""When this function is run from the main thread, it will force other
23
23
threads to exit when any modules currently loaded change.
28
for filename in filter(None, [getattr(module, "__file__", None)
30
for filename in filter(None, [getattr(module, '__file__', None)
29
31
for module in sys.modules.values()]):
30
32
while not os.path.isfile(filename): # Probably in an egg or zip file
31
33
filename = os.path.dirname(filename)