[Tutor] Importing Pygame

Glenn Lester glester at avant.ca
Tue Jan 28 21:47:44 CET 2014


I think you typed a comma instead of a period when you coded import
pygame.sys
Or it may be my display. Check it out.

Best of Luck


On Tue, Jan 28, 2014 at 1:13 PM, myles broomes
<mylesbroomes at hotmail.co.uk>wrote:

> I am trying to import pygame but everytime I do, I get an ImportError.
> Here is the code I'm trying to run:
>
> import pygame,sys
> from pygame.locals import *
>
> pygame.init()
> DISPLAYSURF=pygame.display.set_mode((400,300))
> pygame.display.set_caption('Hello World!')
> while True: #main game loop
>     for event in pygame.event.get():
>         if event.type==QUIT:
>             pygame.quit()
>             sys.exit()
>     pygame.display.update()
>
> And the error I get:
>
> Traceback (most recent call last):
>   File "C:\Python32\blankgame.py", line 1, in <module>
>     import pygame,sys
> ImportError: No module named 'pygame'
>
> When I import pygame using the shell however, it works fine. I am using
> Python 3.2.3 and the Pygame installer I downloaded ispygame-1.9.2a0.win32-py3.2.msi.
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>
>


-- 

*Glenn Lester*

Software Tester

*Avant Systems Group*

*voice: *204.789.9596 x19 *|** fax: *204.789.9598 *|** email: *
glester at avant.ca*|** web: *www.avant.ca



*Quality People Delivering Quality Solutions*

CONFIDENTIALITY NOTICE: This correspondence and any attachment(s) may
contain confidential information that is legally privileged. If you are not
the intended recipient, or the person responsible for delivering it, you
are hereby notified that any disclosure, copying, distribution or use of
any of the aforementioned information is STRICTLY PROHIBITED. If you have
received this transmission in error, please permanently delete the original
transmission and its attachments without reading or saving in any manner.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140128/b92e42a7/attachment-0001.html>


More information about the Tutor mailing list