[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Pygame trouble on the Mac
that code listing you posted works just fine for me on OS X 10.5. I think I can help you if we can figure out what is different about your setup than mine that is causing the program not to work.
I had to use different images than you cause I don't know where I'm supposed to get the two used in the program - Is there some place I can get the images you are using?
In terms of my system config, I'm on an Intel mac mini running Mac OS X 10.5.6, with framework builds of python installed (I tested with 2.5 and 2.6) with development builds (pre-release 1.9.1) of pygame. The version of pygame I'm using uses SDL 1.2.13. The script works fine for me from both from the terminal and running from pydev in the eclipse editor.
So how did you install pygame? How are you running the script?
..also, If you could post to the list what is output if you run a script with the lines below, it will let people know what versions of things you are running, and what kind of mac machine you have:
On Sun, Mar 8, 2009 at 12:22 PM, James Morris <james.morris1984@xxxxxxxxxxxxxx>
It's this one:
Listing3-1. Hello World Redux (helloworld.py) (page 45)
background_image_filename = 'sushiplate.jpg'
mouse_image_filename = 'fugu.png'
from pygame.locals import *
from sys import exit
screen = pygame.display.set_mode((640, 480), 0, 32)
background = "">
mouse_cursor = pygame.image.load(mouse_image_filename).convert_alpha()
for event in pygame.event.get():
if event.type == QUIT:
x, y = pygame.mouse.get_pos()
x-= mouse_cursor.get_width() / 2
y-= mouse_cursor.get_height() / 2
screen.blit(mouse_cursor, (x, y))
<--- THING IS, i just dont understand why some examples work in Pygame
and others doesn't. I've spoke to the author of the book too, and he
directed me to this mailing group. So I hope someone can help! ...
It's annoying that I have the book, but can't run the examples. I have
Python 2.5 on my Mac OSX 10.5 machine. ? The error that was generated
in the Python console didn't have a line number. Just exactly what I
posted... Maybe its just a warning? Either way the program doesn't run
2009/3/8 Ian Mallett <geometrian@xxxxxxxxx>:
- Show quoted text -
> I have the book too. Which example are you running? It should also give a
> line number.