Skip to content

New REPL does not work well with Tkinter #121588

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
serhiy-storchaka opened this issue Jul 10, 2024 · 4 comments
Closed

New REPL does not work well with Tkinter #121588

serhiy-storchaka opened this issue Jul 10, 2024 · 4 comments
Assignees
Labels
3.13 bugs and security fixes 3.14 bugs and security fixes type-bug An unexpected behavior, bug, or error

Comments

@serhiy-storchaka
Copy link
Member

serhiy-storchaka commented Jul 10, 2024

Bug report

The simplest example, import Tkinter and create the root widget:

>>> import tkinter
>>> root = tkinter.Tk()
>>> █

A new Tk window appeared and grabbed the focus. Switch back to the terminal and press the <Up> key -- nothing changed:

>>> import tkinter
>>> root = tkinter.Tk()
>>> █

Press it again -- the last entered line appeared for editing:

>>> import tkinter
>>> root = tkinter.Tk()
>>> root = tkinter.Tk()█

Press the <Enter> key and the edited line will be replaced by another line which will execute:

>>> import tkinter
>>> root = tkinter.Tk()
>>> import tkinter
>>> █

cc @pablogsal

@serhiy-storchaka serhiy-storchaka added type-bug An unexpected behavior, bug, or error 3.13 bugs and security fixes 3.14 bugs and security fixes labels Jul 10, 2024
@serhiy-storchaka
Copy link
Member Author

If press other cursor moving keys, the current line will be replaced by the correct line. But there are glitches: when you press the <Left> key, cursor moves right, and only when you continue to press it again it moves left (but I am not sure about its true position). And the opposite for for the <Right> keys.

@pablogsal
Copy link
Member

Can you check if #121498 fixes the problem?

@pablogsal
Copy link
Member

I tested manually and it fixes it on my end. Do you want to keep this open until we land #121498 ?

@serhiy-storchaka
Copy link
Member Author

Yes, it solves this issue.

Closing as a duplicate of #121497.

@serhiy-storchaka serhiy-storchaka closed this as not planned Won't fix, can't repro, duplicate, stale Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.13 bugs and security fixes 3.14 bugs and security fixes type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants