structure opened this issue on Jun 27, 2019 Β· 94 posts
Y-Phil posted Wed, 29 December 2021 at 12:46 PM
I don't know if this can help someone, but just in case...
These last months, I've been writing a toolbox with a few wxpython script to import, as the main script has more than 1100 lines. The problem with python is that once a module is imported, it remains in memory, and I've been searching a way to pop it out if there's an error in it, hence this method (I'm writing for Poser12):
import sys
try: sys.modules.pop('my_module')
except: pass
from my_module import MyClass
π«π½ππ
(γ£ββ‘β)γ£
πΏ Win11 on i9-13900K@5GHz, 64GB, RoG Strix B760F Gaming, Asus Tuf Gaming RTX 4070 OC Edition, 1+2 TB SSD's, 6+4TB HD
πΏ Mac Mini M2, Sequoia 15.5, 16GB, 500GB SSD
πΏ Nas 10TB
πΏ Poser 13 and 14 β€οΈ