structure opened this issue on Jun 27, 2019 Β· 94 posts
Y-Phil posted Sat, 26 February 2022 at 11:15 AM
Well... Thank you for that nice trick! πY-Phil posted at 12:46 PM Wed, 29 December 2021 - #4432576
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 systry: sys.modules.pop('my_module')except: passfrom my_module import MyClass
nice, there is also another method :
import importlibimport moduleimportlib.reload(module)
π«π½ππ
(γ£ββ‘β)γ£
πΏ 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, Tahoe 26.5, 16GB, 500GB SSD
πΏ Nas 10TB
πΏ Poser 13 and 14 β€οΈ