Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a81e931 + 02fc261 commit 0b98a14Copy full SHA for 0b98a14
1 file changed
lib/matplotlib/__init__.py
@@ -1262,7 +1262,11 @@ def interactive(b):
1262
1263
def is_interactive():
1264
'Return true if plot mode is interactive'
1265
- b = rcParams['interactive'] and hasattr(sys, 'ps1')
+ # ps1 exists if the python interpreter is running in an
1266
+ # interactive console; sys.flags.interactive is true if a script
1267
+ # is being run via "python -i".
1268
+ b = rcParams['interactive'] and (
1269
+ hasattr(sys, 'ps1') or sys.flags.interactive)
1270
return b
1271
1272
def tk_window_focus():
0 commit comments