im trying to build some code that will open new Tkinter window and then there will be a text box that the client would enter text there, and the text will be saved in some variable in my code. i dont understand what doesn`t work, the window is not being opened. Help please..
import sys
from Tkinter import *
def mhello():
mtext = ment.get()
mlabel2 = Label(mGui, text = mtext).pack()
return
mGui = Tk()
ment = StringVar()
mGui.geometry('450x450+500+300')
mGui.title('Nir`s ScreenShare')
mlabel = Label(mGui,text='My Label').pack()
mbutton = Button(mGui, text = 'OK', command = mhello,fg = 'red', bg='blue').pack()
mEntry = Entry(mGui,textvariable=ment).pack()
** im working with python 2.7 if it matters