Sign in to follow this  
Zaku

how do i import pygame?

Recommended Posts

how do i import pyame in python? i read a book on how to make games in python and they told me how to import pygame, but it said that like locals wasnt found or something.

Share this post


Link to post
Share on other sites
ok, i wrote 'import pygame' at the top, then wrote 'Pygame.display.set_mode()' to set the surface. then when i ran the program, it said:
Traceback (most recent call last):
File "C:/Documents and Settings/Family/Desktop/Python junk/pygame.py", line 2, in -toplevel-
import pygame
File "C:/Documents and Settings/Family/Desktop/Python junk\pygame.py", line 4, in -toplevel-
pygame.display.set_mode()
AttributeError: 'module' object has no attribute 'display'


i tried a bunch of differnt variations, like capitalizing, uncapitalizing, adding a star, taking a star away, changing the file name, but it still has a error kind of like what i said before, but slightly different.

can i just get a code on how to import python and set a surface correctly?


wait! i got it. nm


Edit: sorry, i double posted

[Edited by - Zaku on October 8, 2006 1:36:47 PM]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this