pygame初始化

使用Anacoda prompt进行安装

pip install pygame

 构建画布

import pygame,sys
from pygame.locals import *

pygame.init()
screen=pygame.display.set_mode((400,300))

while True:
    for event in pygame.event.get():
        if event.type==QUIT:
            pygame.quit()
            sys.exit()
    pygame.display.update()


print(pygame.ver)

猜你喜欢

转载自blog.csdn.net/qq_26798533/article/details/121070539
今日推荐