ipython / ipython/ipython

Interactive mode not activated by default for scripts

Open
#14,103 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
16.8k
Forks
4.5k
Avg merge
1d 2h
Merged PRs (30d)
6

Description

Hello,

After updating my installation, I observed that the interactive mode is not active anymore for scripts in IPython. This seems to be a regression. The attached script contains description and minimal example.

Script to launch under IPython 8.14.0, with Python 3.11.3, matplotlib 3.7.1 :

$ ipython3.exe --pylab
> %run pb_interactive.py

Result:
- The interactive mode is not activated inside the script.
- The figure is blocking the IPython interface.

Expected:
- Interactive mode should be active by default.
- The figure should not block the interface.
- The last line shoud have been have been executed.

Workaround:
- Run the ion() command from inside the script (uncomment the corresponding line below).
- But this should not be necessary.

[pb_interactive.txt](https://github.com/ipython/ipython/files/11834996/pb_interactive.txt)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.