4 ms·
What? Yes you can. I do it all the time. import code; code.interact(local=vars(foo)) where `foo` is the module object you want to set as current. This lau
by gilch 3y ago
What? Yes you can. I do it all the time.
import code; code.interact(local=vars(foo))
where `foo` is the module object you want to set as current. This launches a subREPL in that module's namespace. (EOF kills the subREPL and returns to main.)
Python has a debugger in the standard library that can also do post-mortem inspections.