Is there any library available in python for the graphical user entry input. I know about tk
but I believe it takes some line of codes to do that. I am looking for
I think this is the shortest you'll get without anything external:
To start:
from tkinter import *
root=Tk()
Instead of a=input('enter something')
:
a=StringVar()
Label(root, text='enter something').pack()
Entry(root, textvariable=a).pack()
Button(root, text='Ok', command=lambda:DoSomethingWithInput(a.get)).pack()
With a function DoSomethingWithInput(a)
Instead of print('some text')
:
Label(root, text='some text').pack()
Button(root, text='Ok', command=DoSomething).pack()
With DoSomething()
as what you do next.