python3 -m pip install -U pygame --user
python3 -m pygame.examples.aliens
import pygame# Define some colors
BLACK = ( 0, 0, 0)
WHITE = ( 255, 255, 255)# This is a simple class that will help us print to the screen
# It has nothing to do with the joysticks, just outputting the
# information.
class TextPrint:def __init__(self):self.reset()self.font = pygame.font.Font(None, 20)def print(self, screen, textString):textBitmap = self.font.render(textString, True, BLACK)screen.blit(textBitmap, [self.x, self.y])self.y += self.line_heightdef reset(self):self.x = 10self.y = 10self.line_height = 15def indent(self):self.x += 10def unin