Latest recipes tagged "reload" Code RecipesReload Tkinter application like a browser (Python) 2017-04-07T12:40:46-07:00Miguel Martínez López <p style="color: grey"> Python recipe 580707 by <a href="/recipes/users/4189907/">Miguel Martínez López</a> (<a href="/recipes/tags/reload/">reload</a>, <a href="/recipes/tags/reloading/">reloading</a>, <a href="/recipes/tags/tkinter/">tkinter</a>). Revision 6. </p> <p><em>run_with_reloader:</em> Binding some hotkeys, for example control-r and control-R, the application is reloaded. It's the same behaviour than a browser. This code is useful for debugging.</p> <p>Some applications use a similar approach for easy development. For example flask and django reloads the application every time they observe a change in a file.</p> Clear Only Project Modules (Python) 2014-12-17T19:03:15-08:00Cornelius Jatniel Prinsloo <p style="color: grey"> Python recipe 578982 by <a href="/recipes/users/4191358/">Cornelius Jatniel Prinsloo</a> (<a href="/recipes/tags/clear/">clear</a>, <a href="/recipes/tags/modules/">modules</a>, <a href="/recipes/tags/project/">project</a>, <a href="/recipes/tags/reload/">reload</a>, <a href="/recipes/tags/script/">script</a>, <a href="/recipes/tags/startup/">startup</a>). </p> <p>Useful for python sessions that have a long startup time because of external dependancies [In my case that would be pygame and pymunk] I've got a slow computer so it takes a while to startup this is the solution I came up with</p> <p>import this before any other of your project imports example: import reloading # The modules in your project folder get cleared then load the rest of your project modules</p> <p>make sure that the reloading script is in your project folder, or else it won't work</p> <p>You might be able to extend this by changing line</p>