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 ce72670

Browse filesBrowse files
authored
Merge pull request #14632 from anntzer/tkwin
DOC: Remove reference to old Tk/Windows bug.
2 parents 66628cc + 5a18309 commit ce72670
Copy full SHA for ce72670

File tree

Expand file treeCollapse file tree

2 files changed

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

2 files changed

+1
-15
lines changed

‎examples/user_interfaces/embedding_in_tk_sgskip.py

Copy file name to clipboardExpand all lines: examples/user_interfaces/embedding_in_tk_sgskip.py
+1-11Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,7 @@ def on_key_press(event):
3939

4040
canvas.mpl_connect("key_press_event", on_key_press)
4141

42-
43-
def _quit():
44-
root.quit() # Stops mainloop.
45-
# The following is necessary on Windows to prevent
46-
# Fatal Python Error: PyEval_RestoreThread: NULL tstate
47-
root.destroy()
48-
49-
50-
button = tkinter.Button(master=root, text="Quit", command=_quit)
42+
button = tkinter.Button(master=root, text="Quit", command=root.quit)
5143
button.pack(side=tkinter.BOTTOM)
5244

5345
tkinter.mainloop()
54-
# If you put root.destroy() here, it will cause an error if the window is
55-
# closed with the window manager.

‎lib/matplotlib/backends/_backend_tk.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/_backend_tk.py
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -465,10 +465,6 @@ def resize(self, width, height):
465465
self.toolbar.configure(width=width)
466466

467467
def show(self):
468-
"""
469-
this function doesn't segfault but causes the
470-
PyEval_RestoreThread: NULL state bug on win32
471-
"""
472468
with _restore_foreground_window_at_end():
473469
if not self._shown:
474470
def destroy(*args):

0 commit comments

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