[Tutor] Learning to use pygame but running into errors when using examples from websites

Rinzwind w.damen at gmail.com
Sat Jan 14 21:32:18 CET 2006


Hello,

I've been trying to get myself to learn using pygame. I have created some
things but I still need help of examples before I can do it myself but I
always run  into trouble.
On this website I saw a lot of great info regarding pygame:

http://www.ida.liu.se/~ETE257/timetable/LecturePythonPygame.html

In there is an example where you can draw lines with your mouse with the
name "Mouse Input" as a header.
This one and more of those examples all end up with errors like this:

I saved the code of the example as PaintCircles.py, chmod it to 777 and run
it.
$ ./PaintCircles.py
from: can't read /var/mail/pygame.locals
./PaintCircles.py: line 9: class: command not found
./PaintCircles.py: line 11: syntax error near unexpected token `('
./PaintCircles.py: line 11: `    def __init__(self):'

I expect the website uses correct code and I am doing something wrong but
can someone tell me what that might be?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060114/dee51c1d/attachment.html 


More information about the Tutor mailing list