A876
0
Q:

how to make a screen in python

import pygame
pygame.init()

sh = int(500)
sw = int(500)
win = pygame.display.set_mode((sh, sw))

run = True
while run:
    pygame.time.delay(100)
	for event in pygame.event.get():
        if event.type == pygame.QUIT:
            run = False
1
# basic setup
from tkinter import *

app = Tk() # the application itself
app.title("Test") # title of window

label = Label(app, text="Testing testing one, two, three") # creates label
label.pack() # adds the label to the window

app.mainloop() # this must go at the end of your window code
-1

New to Communities?

Join the community