Skip to content

tkinter window doesn't open until mainloop() is invoked #1012

Description

@djaychela

I'm seeing a difference in behaviour between the python REPL and bpython.

When running this as two lines in the REPL:

import tkinter as tk
window = tk.Tk()

On python 3.12 (and I believe earlier) as soon as the window is created, it appears.

On bpython running the code makes a separate python app appear (i.e Python appears at the top left of the screen), but there's no window. If I look in 'force quit' then Python says it's not responding.

However, I can get the window to appear by calling window.mainloop(). In addition when this is called, Python no longer appears as 'not responding' in the Force Quit window.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions