Issues with multiple files and detecting changes
I've created some classes in a file (let's call this file Abc) and want to call it from another file (let's call this one Def). After my import of Abc into file Def, I can instantiate the class in file Abc.
However, once I start making changes to the class in Abc, my changes don't get reflected when I run Def until I kill Pythonista and restart. If I do the name == main check in Abc, I can run a simple test within Abc and see my changes - but even after this if I rerun Def, my changes are not reflected (until the restart). It's almost as if the Abc file is cached in memory.
I am using ios 8.2 with Pythonista 1.5 on an Air 2.
When you import in Python, the imported module is indeed cached. You can use
reloadon the imported module, e.g
import abc reload (abc)
Alternatively, you could use this in the action menu to reload all custom modules in one shot.
Thanks! That helps!