python pygame blit. Getting an image to display
问题 I'm trying to get my webcam to show video through pygame. Here is the code: # import the relevant libraries import time import pygame import pygame.camera from pygame.locals import * # this is where one sets how long the script # sleeps for, between frames.sleeptime__in_seconds = 0.05 # initialise the display window pygame.init() pygame.camera.init() screen = pygame.display.set_mode((640, 480), 0, 32) # set up a camera object cam = pygame.camera.Camera(0) # start the camera cam.start() while