Python Forum

Full Version: [split] Apparently module has no attribute display?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Im trying to learn to use pygame but wheni run this code it gets error for all the attributes of pygame:

import pygame
from pygame import *

pygame.init()

gameDisplay = pygame.display.set_mode((800,600))

pygame.dislpay.setcaption('Pygame Game')

clock = pygame.time.Clock()

crashed = False

while not crashed:
	for event in pygame.event.get():
		if event.type == pygame.QUIT:
			crashed = True
			
		print(event)
		
	pygame.display.update()
	
	clock.tick(30)
	
pygame.quit()
quit()
Please tell me how to fix that. Im working in Ubuntu 16.04
I guess your own file is named pygame.py....If that is the case - rename it to something else