Forum Archive

Clashing module

polymerchm

I noticed tonight that if I run one script using numpy (as np), then run diffferent script where the variable has the same name (no numpy this time), the second script complains about the variable being in the numpy namespace . So.... how do I completely unload all modules and clear the namespaces without rebooting pythonista altogether?

dgelessus

You might want to modify the second script to either del np or assign something else to np before using it. Shouldn't you get a NameError because of the missing variable otherwise?