mytools py in example - to register code like the function wrapper here as its callback handlers in factyou can use this technique to route the output of any function call or command line to pop-up windowas usualthe notion of compatible object interfaces is at the heart of much of python code' flexibility reloading callback handlers dynamically our next gui programming technique is all about changing gui while it is running-the ultimate in customization the python imp reload function lets you dynamically change and reload program' modules without stopping the program for instanceyou can bring up text editor window to change the source code of selected parts of system while it is running and see those changes show up immediately after reloading the changed module this is powerful featureespecially for developing programs that take long time to restart programs that connect to databases or network serversinitialize large objectsimplement long-running servicesor travel through long series of steps to retrigger callback are prime candidates for reload it can shave substantial time from the development cycle and make systems more flexible the catch for guisthoughis that because callback handlers are registered as object references rather than module and object namesreloads of callback handler functions are ineffective after the callback has been registered the python imp reload operation works by changing module object' contents in place because tkinter stores pointer to the registered handler object directlythoughit is oblivious to any reloads of the module that the handler came from that istkinter will still reference module' old objects even after the module is reloaded and changed this is subtle thingbut you really only need to remember that you must do something special to reload callback handler functions dynamically not only do you need to gui coding techniques