Advertisement
KodingKid

How to make a 1080p window in Python - Throwback scripts #3

May 2nd, 2021
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.78 KB | None | 0 0
  1. import pygame #imports pygame
  2. from pygame.locals import * #imports variables
  3. import time #imports time
  4. quality1 = (1920, 1080) #makes a 1080p window
  5. light white = (255,255,255) #makes the screen white
  6. dark black = (0,0,0) #makes the screen black
  7. window1 = pygame.display.set_mode(resolution) #the screen starts out just white
  8. while True: #while the program is running
  9.     window1.fill(white) #the screen will be white
  10.     pygame.display.flip() #it will display on your screen
  11.     time.sleep(5) #after 5 seconds...
  12.     window1.fill(black) #the screen will turn black
  13.     for event in pygame.event.get(): #in the event...
  14.         if event.type == QUIT: #you close the window...
  15.             pygame.quit() #the program stops running
  16. #i made this script after about 1 month of learning python
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement