Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Pythonista reload all modules?
-
Is there a way to reload all the modules, or at least some folder in Pythonista? It is really annoying to restart it, or to use reload() functions everywhere.
Is there some other way? -
You might try this somewhat hackish function:
import sys def reload_all(): for name, module in sorted(sys.modules.iteritems()): if hasattr(module, '__file__') and '.' not in name: print "Reloading module '%s'..." % name reload(module)
-
Here's an improved version that reloads all modules located in ~/Documents and subfolders, including site-packages:
http://github.com/dgelessus/pythonista-scripts/blob/master/reload_all.py