If you want to use the default Python interpreter, you can do
import code code.interact(local=dict(globals(), **locals()))
This will allow access to both local and global.
If you want to go to the IPython interpreter, the IPShellEmbed solution IPShellEmbed deprecated . Currently working:
from IPython import embed embed()
Ronan Paixรฃo Oct 06 2018-01-15T00: 00Z
source share