Answers for "python make window"

2

how to make a window in python

import tkinter
from tkinter import *

#this makes the window
window = Tk()
#title
window.title("My Window")
#change the size to whatever you want too
window.configure(width = 800, height = 800)
#change the background color to whatever you want too
window.configure(bg = 'black')
#this runs the window
window.mainloop()

#simple way to a window in python
Posted by: Guest on August-05-2021
3

make a window tkinter

#!/usr/bin/python

import Tkinter
top = Tkinter.Tk()
# Code to add widgets will go here...
top.mainloop()
Posted by: Guest on May-23-2020

Python Answers by Framework

Browse Popular Code Answers by Language