[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Very beginner level question



1 you need import pygame along with from pygame.locals import *
2 get python2.5, not 2.4 or 2.6

--- On Fri, 2/6/09, Varsha Purohit <varsha.purohit@xxxxxxxxx> wrote:

From: Varsha Purohit <varsha.purohit@xxxxxxxxx>
Subject: [pygame] Very beginner level question
To: pygame-users@xxxxxxxx
Date: Friday, February 6, 2009, 12:04 PM

Hello everyone,
     I just started programming again in pygame. I have downloaded python 2.4 and pygame msi for the same. I am writing a basic program of screen initialization

from pygame.locals import *

screen = pygame.display.set_mode((1024,768))

and i get an error message.
Traceback (most recent call last):
  File "C:/pygames/car.py", line 3, in -toplevel-
    screen = pygame.display.set_mode((1024,768))
NameError: name 'pygame' is not defined

What does this mean ??

thanks,
Varsha