how to open a window in python

Solutions on MaxInterview for how to open a window in python by the best coders in the world

showing results for - "how to open a window in python"
Juan Martín
28 Jul 2016
1import tkinter as tk
2 
3 
4def new_window1():
5    " new window"
6    try:
7        if win1.state() == "normal": win1.focus()
8    except NameError as e:
9        print(e)
10        win1 = tk.Toplevel()
11        win1.geometry("300x300+500+200")
12        win1["bg"] = "navy"
13        lb = tk.Label(win1, text="Hello")
14        lb.pack()
15 
16 
17win = tk.Tk()
18win.geometry("200x200+200+100")
19button = tk.Button(win, text="Open new Window")
20button['command'] = new_window1
21button.pack()
22win.mainloop()
23
queries leading to this page
python open windowshow to open a tk windowopen a window in pythonhow ot open window in oythontkinter open another window pyrthonhow to open new window in pythonpython code to open new windowhow do you open create a window in pythonopen new windows pythonpython open the window of a softwarehow to print open window in pythonopening a windowusing pythonpython open windowopen a window pythonopen window in pythonopen new window pythonopen window of windows with pythonopen a window pythinhow to create window using pythonhow to use a window with pythonpython how to open in new windowhow to add window in window pythonpython open new window tkinterhow to make a window in pythonhow to make python open a windowhow to open window in pythonhow to open a new window in flask webguiopen window with pythonhow to make pyton open a windowpython how to open file windowhow to get window using pythonopen a new window pythonhow to open a new window using pythonhow to open a window with pythonpython open a windowpython make windowsopen window pythonopen python file in new window pythonopen a window with pythonhow to link a js file to pythonpython how to show a windowtkinter next window after loginhow to do a window screen in pythonhow to make new window in tkinterpython create windowhow to open a window in pythonrun new window in pythonhow to make window pythonpython tkinter open new window with infopython information from open windowhow to open a window on pythonhow to open python filehow to make your python program open in a new windowopen python program in windowhow to open a window in python