Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0b98a14

Browse filesBrowse files
committed
Merge pull request #2503 from mdboom/fix-interactive
Fix interactive mode detection
2 parents a81e931 + 02fc261 commit 0b98a14
Copy full SHA for 0b98a14

File tree

Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed

‎lib/matplotlib/__init__.py

Copy file name to clipboardExpand all lines: lib/matplotlib/__init__.py
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1262,7 +1262,11 @@ def interactive(b):
12621262

12631263
def is_interactive():
12641264
'Return true if plot mode is interactive'
1265-
b = rcParams['interactive'] and hasattr(sys, 'ps1')
1265+
# 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)
12661270
return b
12671271

12681272
def tk_window_focus():

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.