"""pygame旋转缩放演示程序,可以把这个程序发展成一个电子相册""" import os import pygame from time import sleep from pygame.locals import * images = os.getcwd() + os.sep + "images" width,height = 800,600 screen = pygame.display.set_mode((width,height)) pygame.display.set_caption("pygame旋转缩放演示程序可做dn 电子相册by李兴球@2018") images = [ images + os.sep + filename for filename in os.listdir(images)] images = [pygame.image.load(image) for image in images] image_amounts = len(images) index = 0 running = True clock = pygame.time.Clock() while running: image = images[index] sleep(1) index = index + 1 index = index % image_amounts pygame.quit()
如需要查看完整代码,请
需要浏览更多吗?
成为会员后,登陆才能继续浏览!联系微信scratch8即可办理会员。
(会员专属:能浏览所有文章,下载所有带链接的Python资源。)