How to get a GUI for an input in python in a couple of lines with the module tkinter and simpledialog. Using the askinteger function of this method you can create a window that will return what your input in an entry. Very useful for your guis.
def winput(title, sentence):
import tkinter as tk
from tkinter import simpledialog
tk.Tk().withdraw()
y = simpledialog.askinteger(title, sentence)
return y
x = winput("Hello", "How is 5 + 5?")
print(x)
Video
Subscribe to the newsletter for updates
Tkinter templatesTwitter: @pythonprogrammi - python_pygame
Claude's Games
1. Memory gameVideos
Speech recognition gamePygame's Platform Game