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

Adam adam.jtm30 at gmail.com
Sat Jan 14 23:14:51 CET 2006

On 14/01/06, Rinzwind <w.damen at gmail.com> wrote:
> 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<http://www.ida.liu.se/%7EETE257/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?

What are you trying to run this program with? Try 'python PaintCircles.py'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060114/20b80f64/attachment.htm 

More information about the Tutor mailing list