Re: [pygame] Help with pygame

2011-12-14 Thread Christopher Night
On Mon, Dec 12, 2011 at 6:06 PM, Christopher Night
cosmologi...@gmail.comwrote:

 Try putting this in the python interpreter and tell us what you get. (Copy
 and paste the output exactly as you get it. Don't try to summarize):

 open(images.BMP) ; import pygame ; pygame.image.get_extended() ;
 pygame.image.load(images.BMP)


On Wed, Dec 14, 2011 at 3:47 PM, Zack Baker zbaker1...@gmail.com wrote:

 BTW i think im just going to reinstall pygame
 the get extended() thing returned 0


Sigh great. Best of luck.

-Christopher


Re: [pygame] Help with pygame

2011-12-14 Thread Brian Fisher
How did you install pygame, Zack?

On Wed, Dec 14, 2011 at 12:47 PM, Zack Baker zbaker1...@gmail.com wrote:
 Ok i ran it and this is the error it gave me...

 2011-12-14 15:46:45.796 Python[12670:f07] Warning once: This application, or 
 a library it uses, is using NSQuickDrawView, which has been deprecated. Apps 
 should cease use of QuickDraw and move to Quartz.
 Traceback (most recent call last):
  File green-car-test.py, line 10, in module
    car=pygame.image.load('green-car.png')
 pygame.error: File is not a Windows BMP file
 On Dec 12, 2011, at 10:11 PM, Brian Fisher wrote:





 BTW i think im just going to reinstall pygame
 the get extended() thing returned 0

 green-car.zip



Re: [pygame] Help with pygame

2011-12-14 Thread Sean Wolfe
Is anybody else here on osx?

On Wed, Dec 14, 2011 at 6:20 PM, Brian Fisher br...@hamsterrepublic.com wrote:
 How did you install pygame, Zack?

 On Wed, Dec 14, 2011 at 12:47 PM, Zack Baker zbaker1...@gmail.com wrote:
 Ok i ran it and this is the error it gave me...

 2011-12-14 15:46:45.796 Python[12670:f07] Warning once: This application, or 
 a library it uses, is using NSQuickDrawView, which has been deprecated. Apps 
 should cease use of QuickDraw and move to Quartz.
 Traceback (most recent call last):
  File green-car-test.py, line 10, in module
    car=pygame.image.load('green-car.png')
 pygame.error: File is not a Windows BMP file
 On Dec 12, 2011, at 10:11 PM, Brian Fisher wrote:





 BTW i think im just going to reinstall pygame
 the get extended() thing returned 0

 green-car.zip




-- 
A musician must make music, an artist must paint, a poet must write,
if he is to be ultimately at peace with himself.
- Abraham Maslow


Re: [pygame] Help with pygame

2011-12-14 Thread Zack Baker
With fink

-Zack


On Dec 14, 2011, at 4:20 PM, Brian Fisher br...@hamsterrepublic.com wrote:

 How did you install pygame, Zack?
 
 On Wed, Dec 14, 2011 at 12:47 PM, Zack Baker zbaker1...@gmail.com wrote:
 Ok i ran it and this is the error it gave me...
 
 2011-12-14 15:46:45.796 Python[12670:f07] Warning once: This application, or 
 a library it uses, is using NSQuickDrawView, which has been deprecated. Apps 
 should cease use of QuickDraw and move to Quartz.
 Traceback (most recent call last):
  File green-car-test.py, line 10, in module
car=pygame.image.load('green-car.png')
 pygame.error: File is not a Windows BMP file
 On Dec 12, 2011, at 10:11 PM, Brian Fisher wrote:
 
 
 
 
 
 BTW i think im just going to reinstall pygame
 the get extended() thing returned 0
 
 green-car.zip
 


Re: [pygame] Help with pygame

2011-12-14 Thread Greg Ewing

Zack Baker wrote:

With fink


I'm on OSX, and I find it's generally less hassle in the long run
to compile everything from source myself rather than rely on things
like fink and macports, so I don't have much experience with them.

But you could look into whether there is a fink version of libpng
that you can install -- that would probably help.

--
Greg


Re: [pygame] Help with pygame

2011-12-14 Thread Zack Baker
Ok, I have deleted everything pygame I could find an now I'm going to reinstall 
it. Along with python 3.2 because I guess now they are compatible on OSX which 
would be great. Btw in case it doesn't could you point me too a link that shows 
how to compile from source? Thanks

-Zack


On Dec 14, 2011, at 4:46 PM, Greg Ewing greg.ew...@canterbury.ac.nz wrote:

 Zack Baker wrote:
 With fink
 
 I'm on OSX, and I find it's generally less hassle in the long run
 to compile everything from source myself rather than rely on things
 like fink and macports, so I don't have much experience with them.
 
 But you could look into whether there is a fink version of libpng
 that you can install -- that would probably help.
 
 -- 
 Greg


Re: [pygame] Help with pygame

2011-12-14 Thread Greg Ewing

On 15/12/11 10:51, Zack Baker wrote:

Ok, I have deleted everything pygame I could find an now I'm going to reinstall 
it.
Along with python 3.2 because I guess now they are compatible on OSX which 
would be great.
Btw in case it doesn't could you point me too a link that shows how to compile 
from
source? Thanks


It's a while since I did it, but as far as I remember, compiling pygame
itself just requires the standard

   python setup.py install

However, before doing that, you should make sure you have libraries
available for handling all the image formats you intend to use. I
had to install libpng and libjpeg (they're easy to compile from source
as well).

You should probably also check that you have the relevant libraries
for fonts and sound. Framework versions of these seem to work best
on OSX. I didn't compile them myself, I just dropped in binary
distributions of SDL_ttf.framework and SDL_mixer.framework (I found
these somwehere on the pygame web site, if I remember correctly).

When you compile pygame, it will given you a summary of which
optional libraries it did and didn't find. If anything is missing,
you can compile again after tracking down and installing them.

--
Greg


Re: [pygame] Help with pygame

2011-12-14 Thread Greg Ewing

Zack Baker wrote:


Traceback (most recent call last):
  File green-car-test.py, line 10, in module
car=pygame.image.load('green-car.png')
pygame.error: File is not a Windows BMP file


It looks to me as though your PyGame installation doesn't have
support for PNG files. It seems to fall back to assuming BMP
if it can't find a handler for the file it's given.

How did you install PyGame? If you're compiling it from source,
the build process should tell you which optional libraries it
found. If PNG support is missing, you might need to install
libpng and recompile PyGame.

--
Greg


Re: [pygame] Help with pygame

2011-12-14 Thread Brian Fisher
I use a Mac, and while I have compiled from source, I wouldn't
recommend it because you still have to manage getting the dependencies
yourself (meaning libpng, libjpg and sdl and maybe a couple others)

I would use a prebuilt installer on this page, if you can find one that works:
http://pygame.org/download.shtml

the prebuilt installers *should* have been made to include all the
dependencies linked in a static or embedded way when possible (so as
to avoid replacing shared components for other software)

On Wed, Dec 14, 2011 at 1:51 PM, Zack Baker zbaker1...@gmail.com wrote:
 Ok, I have deleted everything pygame I could find an now I'm going to 
 reinstall it. Along with python 3.2 because I guess now they are compatible 
 on OSX which would be great. Btw in case it doesn't could you point me too a 
 link that shows how to compile from source? Thanks

 -Zack


 On Dec 14, 2011, at 4:46 PM, Greg Ewing greg.ew...@canterbury.ac.nz wrote:

 Zack Baker wrote:
 With fink

 I'm on OSX, and I find it's generally less hassle in the long run
 to compile everything from source myself rather than rely on things
 like fink and macports, so I don't have much experience with them.

 But you could look into whether there is a fink version of libpng
 that you can install -- that would probably help.

 --
 Greg


Re: [pygame] Help with pygame

2011-12-14 Thread Lenard Lindstrom

You will need the SDL_image library to load anything other than BMP files.

Lenard Lindstrom

On 14/12/11 01:51 PM, Zack Baker wrote:

Ok, I have deleted everything pygame I could find an now I'm going to reinstall 
it. Along with python 3.2 because I guess now they are compatible on OSX which 
would be great. Btw in case it doesn't could you point me too a link that shows 
how to compile from source? Thanks

-Zack


On Dec 14, 2011, at 4:46 PM, Greg Ewinggreg.ew...@canterbury.ac.nz  wrote:


Zack Baker wrote:

With fink

I'm on OSX, and I find it's generally less hassle in the long run
to compile everything from source myself rather than rely on things
like fink and macports, so I don't have much experience with them.

But you could look into whether there is a fink version of libpng
that you can install -- that would probably help.

--
Greg




Re: [pygame] Help with pygame

2011-12-12 Thread Zack Baker
Just because I keep switching it around and trying different images with 
different extensions. I get the same error with all though

-Zack


On Dec 12, 2011, at 4:40 PM, Christopher Night cosmologi...@gmail.com wrote:

 Okay obvious question why is your code trying to load a file called 
 images.BMP if this file's name is green-car.png?
 
 -Christopher
 
 On Mon, Dec 12, 2011 at 4:25 PM, Zack Baker zbaker1...@gmail.com wrote:
 green-car.png
 
 On Dec 11, 2011, at 9:38 PM, Sean Wolfe wrote:
 
 also .. the error says windows bmp but you're on osx ... maybe we have
 a bug handling bmps in osx?
 
 On Sun, Dec 11, 2011 at 11:36 PM, Sean Wolfe ether@gmail.com wrote:
 is there a reason why you're loading the image in the while loop? The
 way I'm reading the code you're loading the bmp every 100ms based on
 clock.tick(10).
 
 How about loading the image first then running the loop.
 
 How big is the bmp?
 
 On Sun, Dec 11, 2011 at 9:44 PM, Brian Fisher br...@hamsterrepublic.com 
 wrote:
 Zach, code looks fine - can you attach the image as well? The problem
 may lie with it.
 
 thanks
 
 On Sun, Dec 11, 2011 at 2:49 PM, Zack Baker zbaker1...@gmail.com wrote:
 Ok guys heres the code. Same error, better code.
 #!/usr/bin/env python
 
 import pygame
 pygame.init()
 
 #Set height and width of the screen
 size=[400,500]
 screen=pygame.display.set_mode(size)
 
 
 #Loop until user clicks the close button
 done=False
 clock=pygame.time.Clock()
 
 while done==False:
 #This limits the while loop to a max of 10 times per second
 clock.tick(10)
 
 for event in pygame.event.get():
 if event.type==pygame.QUIT:
 done=True
 car=pygame.image.load('images.BMP')
 screen.blit(car, (50, 100))
 pygame.display.flip()
 
 
 pygame.quit()
 
 
 
 
 
 
 
 pygame.quit()
 
 
 
 
 --
 A musician must make music, an artist must paint, a poet must write,
 if he is to be ultimately at peace with himself.
 - Abraham Maslow
 
 
 
 -- 
 A musician must make music, an artist must paint, a poet must write,
 if he is to be ultimately at peace with himself.
 - Abraham Maslow
 
 


Re: [pygame] Help with pygame

2011-12-12 Thread Christopher Night
Can you please post images.BMP? You know, the image file you actually tried
to load? I think it's possible your pygame was installed without support
for file types other than uncompressed BMP. Try putting this in the python
interpreter and tell us what you get. (Copy and paste the output exactly as
you get it. Don't try to summarize):

open(images.BMP) ; import pygame ; pygame.image.get_extended() ;
pygame.image.load(images.BMP)

Just a helpful tip, but it's kind of frustrating for people to try to help
you when you keep switching it around. It's great to try to work things
out, but you need to be consistent when you ask for help. Don't say this
code snippet produces this error if the error was actually produced by a
different code snippet. You'll get much better help back. :)

-Christopher

On Mon, Dec 12, 2011 at 5:45 PM, Zack Baker zbaker1...@gmail.com wrote:

 Just because I keep switching it around and trying different images with
 different extensions. I get the same error with all though

 -Zack


 On Dec 12, 2011, at 4:40 PM, Christopher Night cosmologi...@gmail.com
 wrote:

 Okay obvious question why is your code trying to load a file
 called images.BMP if this file's name is green-car.png?

 -Christopher

 On Mon, Dec 12, 2011 at 4:25 PM, Zack Baker zbaker1...@gmail.com wrote:

 green-car.png

 On Dec 11, 2011, at 9:38 PM, Sean Wolfe wrote:

 also .. the error says windows bmp but you're on osx ... maybe we have
 a bug handling bmps in osx?

 On Sun, Dec 11, 2011 at 11:36 PM, Sean Wolfe ether@gmail.com wrote:

 is there a reason why you're loading the image in the while loop? The

 way I'm reading the code you're loading the bmp every 100ms based on

 clock.tick(10).


 How about loading the image first then running the loop.


 How big is the bmp?


 On Sun, Dec 11, 2011 at 9:44 PM, Brian Fisher br...@hamsterrepublic.com
 wrote:

 Zach, code looks fine - can you attach the image as well? The problem

 may lie with it.


 thanks


 On Sun, Dec 11, 2011 at 2:49 PM, Zack Baker zbaker1...@gmail.com wrote:

 Ok guys heres the code. Same error, better code.

 #!/usr/bin/env python


 import pygame

 pygame.init()


 #Set height and width of the screen

 size=[400,500]

 screen=pygame.display.set_mode(size)



 #Loop until user clicks the close button

 done=False

 clock=pygame.time.Clock()


 while done==False:

 #This limits the while loop to a max of 10 times per second

 clock.tick(10)


 for event in pygame.event.get():

 if event.type==pygame.QUIT:

 done=True

 car=pygame.image.load('images.BMP')

 screen.blit(car, (50, 100))

 pygame.display.flip()



 pygame.quit()








 pygame.quit()





 --

 A musician must make music, an artist must paint, a poet must write,

 if he is to be ultimately at peace with himself.

 - Abraham Maslow




 --
 A musician must make music, an artist must paint, a poet must write,
 if he is to be ultimately at peace with himself.
 - Abraham Maslow






Re: [pygame] Help with pygame

2011-12-12 Thread Ian Mallett
On Mon, Dec 12, 2011 at 4:06 PM, Christopher Night
cosmologi...@gmail.comwrote:

 Can you please post images.BMP? You know, the image file you actually
 tried to load? I think it's possible your pygame was installed without
 support for file types other than uncompressed BMP. Try putting this in the
 python interpreter and tell us what you get. (Copy and paste the output
 exactly as you get it. Don't try to summarize):

 open(images.BMP) ; import pygame ; pygame.image.get_extended() ;
 pygame.image.load(images.BMP)

 Just a helpful tip, but it's kind of frustrating for people to try to help
 you when you keep switching it around. It's great to try to work things
 out, but you need to be consistent when you ask for help. Don't say this
 code snippet produces this error if the error was actually produced by a
 different code snippet. You'll get much better help back. :)

 -Christopher

+1

I recommend just posting a .zip, at this point, with all your files in it.


Re: [pygame] Help with pygame

2011-12-11 Thread Zack Baker
Ok guys heres the code. Same error, better code.
#!/usr/bin/env python

import pygame
pygame.init()

#Set height and width of the screen
size=[400,500]
screen=pygame.display.set_mode(size)


#Loop until user clicks the close button
done=False
clock=pygame.time.Clock()

while done==False:
#This limits the while loop to a max of 10 times per second
clock.tick(10)

for event in pygame.event.get():
if event.type==pygame.QUIT:
done=True
car=pygame.image.load('images.BMP')
screen.blit(car, (50, 100))
pygame.display.flip()



pygame.quit()




  


pygame.quit()



Re: [pygame] Help with pygame

2011-12-11 Thread Brian Fisher
Zach, code looks fine - can you attach the image as well? The problem
may lie with it.

thanks

On Sun, Dec 11, 2011 at 2:49 PM, Zack Baker zbaker1...@gmail.com wrote:
 Ok guys heres the code. Same error, better code.
 #!/usr/bin/env python

 import pygame
 pygame.init()

 #Set height and width of the screen
 size=[400,500]
 screen=pygame.display.set_mode(size)


 #Loop until user clicks the close button
 done=False
 clock=pygame.time.Clock()

 while done==False:
     #This limits the while loop to a max of 10 times per second
     clock.tick(10)

     for event in pygame.event.get():
         if event.type==pygame.QUIT:
             done=True
     car=pygame.image.load('images.BMP')
     screen.blit(car, (50, 100))
     pygame.display.flip()


 pygame.quit()







 pygame.quit()



Re: [pygame] Help with pygame

2011-12-11 Thread Sean Wolfe
is there a reason why you're loading the image in the while loop? The
way I'm reading the code you're loading the bmp every 100ms based on
clock.tick(10).

How about loading the image first then running the loop.

How big is the bmp?

On Sun, Dec 11, 2011 at 9:44 PM, Brian Fisher br...@hamsterrepublic.com wrote:
 Zach, code looks fine - can you attach the image as well? The problem
 may lie with it.

 thanks

 On Sun, Dec 11, 2011 at 2:49 PM, Zack Baker zbaker1...@gmail.com wrote:
 Ok guys heres the code. Same error, better code.
 #!/usr/bin/env python

 import pygame
 pygame.init()

 #Set height and width of the screen
 size=[400,500]
 screen=pygame.display.set_mode(size)


 #Loop until user clicks the close button
 done=False
 clock=pygame.time.Clock()

 while done==False:
     #This limits the while loop to a max of 10 times per second
     clock.tick(10)

     for event in pygame.event.get():
         if event.type==pygame.QUIT:
             done=True
     car=pygame.image.load('images.BMP')
     screen.blit(car, (50, 100))
     pygame.display.flip()


 pygame.quit()







 pygame.quit()




-- 
A musician must make music, an artist must paint, a poet must write,
if he is to be ultimately at peace with himself.
- Abraham Maslow


Re: [pygame] Help with pygame

2011-12-11 Thread Sean Wolfe
also .. the error says windows bmp but you're on osx ... maybe we have
a bug handling bmps in osx?

On Sun, Dec 11, 2011 at 11:36 PM, Sean Wolfe ether@gmail.com wrote:
 is there a reason why you're loading the image in the while loop? The
 way I'm reading the code you're loading the bmp every 100ms based on
 clock.tick(10).

 How about loading the image first then running the loop.

 How big is the bmp?

 On Sun, Dec 11, 2011 at 9:44 PM, Brian Fisher br...@hamsterrepublic.com 
 wrote:
 Zach, code looks fine - can you attach the image as well? The problem
 may lie with it.

 thanks

 On Sun, Dec 11, 2011 at 2:49 PM, Zack Baker zbaker1...@gmail.com wrote:
 Ok guys heres the code. Same error, better code.
 #!/usr/bin/env python

 import pygame
 pygame.init()

 #Set height and width of the screen
 size=[400,500]
 screen=pygame.display.set_mode(size)


 #Loop until user clicks the close button
 done=False
 clock=pygame.time.Clock()

 while done==False:
     #This limits the while loop to a max of 10 times per second
     clock.tick(10)

     for event in pygame.event.get():
         if event.type==pygame.QUIT:
             done=True
     car=pygame.image.load('images.BMP')
     screen.blit(car, (50, 100))
     pygame.display.flip()


 pygame.quit()







 pygame.quit()




 --
 A musician must make music, an artist must paint, a poet must write,
 if he is to be ultimately at peace with himself.
 - Abraham Maslow



-- 
A musician must make music, an artist must paint, a poet must write,
if he is to be ultimately at peace with himself.
- Abraham Maslow


Re: [pygame] Help with pygame

2011-12-10 Thread Miriam English
Also, you might think this is pretty obvious, but it surprises me how 
many people I've seen make this mistake, so I'll mention it anyway, just 
in case... renaming a file with a different extension won't make it the 
right kind of file. For instance renaming a jpeg file from blah.jpg to 
blah.bmp doesn't make it a bmp file. It must be loaded into a graphics 
program like Gimp then saved out as the new format.


Cheers,

- Miriam

--
If you don't have any failures then you're not trying hard enough.
 - Dr. Charles Elachi, director of NASA's Jet Propulsion Laboratory
-
Website: http://miriam-english.org
Blogs:   http://miriam-e.dreamwidth.org
 http://miriam-e.livejournal.com


Re: [pygame] Help with pygame

2011-12-10 Thread Zack Baker
Sorry guys, my bad, I only changed the name when I put the code on there. It 
was both images.png or whatever. I'm very sorry for the confusion. Also could 
the problem be that I didn't draw the screen?

-Zack


On Dec 10, 2011, at 4:42 AM, Miriam English m...@miriam-english.org wrote:

 Also, you might think this is pretty obvious, but it surprises me how many 
 people I've seen make this mistake, so I'll mention it anyway, just in 
 case... renaming a file with a different extension won't make it the right 
 kind of file. For instance renaming a jpeg file from blah.jpg to blah.bmp 
 doesn't make it a bmp file. It must be loaded into a graphics program like 
 Gimp then saved out as the new format.
 
 Cheers,
 
- Miriam
 
 -- 
 If you don't have any failures then you're not trying hard enough.
 - Dr. Charles Elachi, director of NASA's Jet Propulsion Laboratory
 -
 Website: http://miriam-english.org
 Blogs:   http://miriam-e.dreamwidth.org
 http://miriam-e.livejournal.com


Re: [pygame] Help with pygame

2011-12-10 Thread Brian Fisher
Zack,
 There are a lot of problems with the script you posted, but the error
you are getting says that the first problem is with loading the image
file, so might as well start there.

 So on your next reply, please attach the image file you are trying to
load and draw. That way people can test themselves which would help a
lot in figuring out what's going on.


On Sat, Dec 10, 2011 at 4:28 AM, Zack Baker zbaker1...@gmail.com wrote:
 Sorry guys, my bad, I only changed the name when I put the code on there. It 
 was both images.png or whatever. I'm very sorry for the confusion. Also could 
 the problem be that I didn't draw the screen?

 -Zack


 On Dec 10, 2011, at 4:42 AM, Miriam English m...@miriam-english.org wrote:

 Also, you might think this is pretty obvious, but it surprises me how many 
 people I've seen make this mistake, so I'll mention it anyway, just in 
 case... renaming a file with a different extension won't make it the right 
 kind of file. For instance renaming a jpeg file from blah.jpg to blah.bmp 
 doesn't make it a bmp file. It must be loaded into a graphics program like 
 Gimp then saved out as the new format.

 Cheers,

    - Miriam

 --
 If you don't have any failures then you're not trying hard enough.
 - Dr. Charles Elachi, director of NASA's Jet Propulsion Laboratory
 -
 Website: http://miriam-english.org
 Blogs:   http://miriam-e.dreamwidth.org
         http://miriam-e.livejournal.com


Re: [pygame] Help with pygame

2011-12-10 Thread Sean Wolfe
also you need a pygame.init() in there...

On Sat, Dec 10, 2011 at 1:49 PM, Brian Fisher br...@hamsterrepublic.com wrote:
 Zack,
  There are a lot of problems with the script you posted, but the error
 you are getting says that the first problem is with loading the image
 file, so might as well start there.

  So on your next reply, please attach the image file you are trying to
 load and draw. That way people can test themselves which would help a
 lot in figuring out what's going on.


 On Sat, Dec 10, 2011 at 4:28 AM, Zack Baker zbaker1...@gmail.com wrote:
 Sorry guys, my bad, I only changed the name when I put the code on there. It 
 was both images.png or whatever. I'm very sorry for the confusion. Also 
 could the problem be that I didn't draw the screen?

 -Zack


 On Dec 10, 2011, at 4:42 AM, Miriam English m...@miriam-english.org wrote:

 Also, you might think this is pretty obvious, but it surprises me how many 
 people I've seen make this mistake, so I'll mention it anyway, just in 
 case... renaming a file with a different extension won't make it the right 
 kind of file. For instance renaming a jpeg file from blah.jpg to blah.bmp 
 doesn't make it a bmp file. It must be loaded into a graphics program like 
 Gimp then saved out as the new format.

 Cheers,

    - Miriam

 --
 If you don't have any failures then you're not trying hard enough.
 - Dr. Charles Elachi, director of NASA's Jet Propulsion Laboratory
 -
 Website: http://miriam-english.org
 Blogs:   http://miriam-e.dreamwidth.org
         http://miriam-e.livejournal.com



-- 
A musician must make music, an artist must paint, a poet must write,
if he is to be ultimately at peace with himself.
- Abraham Maslow


Re: [pygame] Help with pygame

2011-12-10 Thread Zack Baker
Ok I will soon post some real code w/ image 

-Zack


On Dec 10, 2011, at 2:12 PM, Sean Wolfe ether@gmail.com wrote:

 also you need a pygame.init() in there...
 
 On Sat, Dec 10, 2011 at 1:49 PM, Brian Fisher br...@hamsterrepublic.com 
 wrote:
 Zack,
  There are a lot of problems with the script you posted, but the error
 you are getting says that the first problem is with loading the image
 file, so might as well start there.
 
  So on your next reply, please attach the image file you are trying to
 load and draw. That way people can test themselves which would help a
 lot in figuring out what's going on.
 
 
 On Sat, Dec 10, 2011 at 4:28 AM, Zack Baker zbaker1...@gmail.com wrote:
 Sorry guys, my bad, I only changed the name when I put the code on there. 
 It was both images.png or whatever. I'm very sorry for the confusion. Also 
 could the problem be that I didn't draw the screen?
 
 -Zack
 
 
 On Dec 10, 2011, at 4:42 AM, Miriam English m...@miriam-english.org wrote:
 
 Also, you might think this is pretty obvious, but it surprises me how many 
 people I've seen make this mistake, so I'll mention it anyway, just in 
 case... renaming a file with a different extension won't make it the right 
 kind of file. For instance renaming a jpeg file from blah.jpg to blah.bmp 
 doesn't make it a bmp file. It must be loaded into a graphics program like 
 Gimp then saved out as the new format.
 
 Cheers,
 
- Miriam
 
 --
 If you don't have any failures then you're not trying hard enough.
 - Dr. Charles Elachi, director of NASA's Jet Propulsion Laboratory
 -
 Website: http://miriam-english.org
 Blogs:   http://miriam-e.dreamwidth.org
 http://miriam-e.livejournal.com
 
 
 
 -- 
 A musician must make music, an artist must paint, a poet must write,
 if he is to be ultimately at peace with himself.
 - Abraham Maslow


Re: [pygame] Help with pygame

2011-12-09 Thread Brian Fisher
There's no way that code matches that error... the code tries to load
car.jpeg, and the error is from a line that tried to load
images.BMP.

So what's the actual name of the image? If you're not sure, what do
you get when you type ls from a command prompt in the same directory
as the python script? Or maybe you can attach the image to your reply
for others to try your code with?

My guess at the problem is you have not tried the actual filename yet.
You need to load the image file by it's actual filename, spelled
exactly correctly. And since you are having the error on a mac, it
must also have the current capitalization.

On Fri, Dec 9, 2011 at 6:26 PM, Zack Baker zbaker1...@gmail.com wrote:
 Hi, i wrote this code
 CODE: SELECT ALLimport pygame
 car=pygame.image.load('car.jpeg') #i have tried car.png car.bmp and so on
 screen.blit(car, (50, 100))
 pygame.display.flip()


 but i get this error
 CODE: SELECT ALLTraceback (most recent call last):
   File /Users/zackbaker/Desktop/Cartest.py, line 2, in module
     car=pygame.image.load('images.BMP')
 error: File is not a Windows BMP file



 HUh?? I tried BMP and bmp as extensions but i keep getting this error. Any
 help would be greatly appreciated. Thanks
 Btw I'm running Mac osx lion

 -Zack



Re: [pygame] Help with pygame

2011-12-09 Thread Ian Mallett
Also screen is not defined.  You'd get that error later.


Re: [pygame] Help with pygame compilation

2010-12-21 Thread Christoph Gohlke



On 12/21/2010 10:22 AM, A BC wrote:

Hi everyone,


Please correct me if I am not on the right list, or if my question is
misplaced, or if the subject is not well chosen.

Here is my issue :
- Running on a 32bits Win7 with Python 2.7 and VC++ 9.0
- Setup.py crashes when it is to compile transform.lib : linking does
not find scale_mmx.obj
C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL
/nologo /INCREMENTAL:NO /LIBPATH:C:/Program Files/Microsoft Visual
Studio 9.0/vc/lib/ /LIBPATH:C:\Python27\libs
/LIBPATH:C:\Python27\PCbuild SDL.lib /EXPORT:inittransform
build\temp.win32-2.7\Release\src/transform.obj
build\temp.win32-2.7\Release\src/rotozoom.obj
build\temp.win32-2.7\Release\src/scale2x.obj obj\win32\scale_mmx.obj
/OUT:build\lib.win32-2.7\pygame\transform.pyd
/IMPLIB:build\temp.win32-2.7\Release\src\transform.lib
/MANIFESTFILE:build\temp.win32-2.7\Release\src\transform.pyd.manifest
LINK : fatal error LNK1181: impossible d'ouvrir le fichier en entrée
'obj\win32\scale_mmx.obj'

(please excuse my french on the link error. The message is LNK1181:
unable to open input file 'obj\win32\scale_mmx.obj')


Well, I am open to anything that could help me have pygame without
installing Python 2.6 (nor MinGW)


pygame-1.9.2pre installers for Python 2.7 are available at 
http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame





P.S. : I had to patch the file Setup because SDL was not found. I just
replaced the /NEED_INCLUDE_PATH_FIXED and lib path. It works for the
previous libs to compile.
P.P.S. : I understand that obj\win32\scale_mmx.obj is the missing
file. I don't know how to have it. I tried to use the scale_mmx.obj
compiled in temp.win32-2.7/... but the linking is not better : 8
external links missing.


Thank you so much !


Re: [pygame] Help with pygame compilation

2010-12-21 Thread A BC
On Tue, Dec 21, 2010 at 7:29 PM, Christoph Gohlke cgoh...@uci.edu wrote:

 pygame-1.9.2pre installers for Python 2.7 are available at 
 http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame


Oh, shame on me

Thank you sincerely !


Re: [pygame] Help configuring Pygame on OS X Leopard

2007-12-02 Thread Richard Jones
On Sun, 2 Dec 2007, Casey Duncan wrote:
 You can use fink (http://finkproject.org/) to install pygame with
 python 2.5. It's also handy for installing other libraries you might
 want (PIL, pyrex, ode, py2app, etc.).

I would be wary of installing one of those parallel packaging systems. I did 
so a number of years ago and ended up with a quite confused system. I ended 
up reinstalling OS X to clear it up.


Richard


Re: [pygame] Help configuring Pygame on OS X Leopard

2007-12-02 Thread Unnsse Khan

That's exactly what I think might have happened to me...

(1) I installed all the available modules from:

http://pythonmac.org/packages/py25-fat/index.html

(2) These files installed the modules in separate places under:

/Developer/Python

(3) When I ran the shell and tried to import pygame:

Falcon:~ untz$ python
Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type help, copyright, credits or license for more information.
 import pygame
Traceback (most recent call last):
 File stdin, line 1, in module
ImportError: No module named pygame

(4) I then attempted to install Pygame by using MacPorts:

sudo port install pygame

The ObjcPy and Numeric libraries (dependencies) had errors when  
MacPorts was trying to install them...


MacPorts installs everything under:

/opt/local/var/macports/sources/rsync.macports.org/release/ports/python

Whereas the package ( see line item (1) ) from:

http://pythonmac.org/packages/py25-fat/index.html

Installs ObjectiveC Python inside:

/Developer/Python/PyObjC

Another person on Pygame's mailing list stated that the Python 2.5  
isn't supported by Pygame and that's why there's no packaged bundle of  
Pygame available for
the Mac Python 2.5 interpreter... He was forced to revert back to  
Python 2.4, in order, to use Pygame...


I don't understand why there's no universal installer for OS X which  
installs everything in the right place or at least sets some  
environmental variables pointing extended Python libraries.


Am not very well versed with configuring Python based systems... Any  
help is greatly appreciated!


Sincere regards,

Unnsse

On Dec 2, 2007, at 12:23 PM, Richard Jones wrote:


On Sun, 2 Dec 2007, Casey Duncan wrote:

You can use fink (http://finkproject.org/) to install pygame with
python 2.5. It's also handy for installing other libraries you might
want (PIL, pyrex, ode, py2app, etc.).


I would be wary of installing one of those parallel packaging  
systems. I did
so a number of years ago and ended up with a quite confused system.  
I ended

up reinstalling OS X to clear it up.


   Richard




Re: [pygame] Help configuring Pygame on OS X Leopard

2007-12-02 Thread Casey Duncan


On Dec 2, 2007, at 12:23 PM, Richard Jones wrote:


On Sun, 2 Dec 2007, Casey Duncan wrote:

You can use fink (http://finkproject.org/) to install pygame with
python 2.5. It's also handy for installing other libraries you might
want (PIL, pyrex, ode, py2app, etc.).


I would be wary of installing one of those parallel packaging  
systems. I did
so a number of years ago and ended up with a quite confused system.  
I ended

up reinstalling OS X to clear it up.


I'm not sure how it would hurt your system, it installs everything  
into it's own directory structure (under /sw by default). If you  
remove that directory, you remove all trace of it. Fink is very  
widely used and is a very convenient way to install OSS on OSX. It's  
never caused me any problems and I know several others who have used  
it without incident.


You can however, screw up your system by modifying the system python,  
which OSX uses in various places. So at the very least, you'll want  
to install your own python somewhere before setting up pygame.


-Casey



Re: [pygame] Help configuring Pygame on OS X Leopard

2007-12-01 Thread Brian Fisher
On Dec 1, 2007 7:10 PM, Unnsse Khan [EMAIL PROTECTED] wrote:
 Installed Pygame by installing the following files located at:

 http://pythonmac.org/packages/py25-fat/index.html

There isn't a pygame package for python 2.5 at that page...

I am not aware of a prebuilt pygame for python 2.5 for Mac OSX (I use
python 2.4 on mac for that reason)

If you want to tackle building it, there are some instructions here:
http://www.pygame.org/wiki/MacCompile?parent=index


Re: [pygame] Help configuring Pygame on OS X Leopard

2007-12-01 Thread Brian Fisher
On Dec 1, 2007 7:10 PM, Unnsse Khan [EMAIL PROTECTED] wrote:
 When I ran this program, I receive the following error message:

 Traceback (most recent call last):
File /Users/untz/DevResources/Python/pygame_helloworld/hello.py,
 line 3, in module
  import pygame
 ImportError: No module named pygame

That error means you don't have pygame installed.


Re: [pygame] Help configuring Pygame on OS X Leopard

2007-12-01 Thread Casey Duncan

On Dec 1, 2007, at 8:12 PM, Brian Fisher wrote:


On Dec 1, 2007 7:10 PM, Unnsse Khan [EMAIL PROTECTED] wrote:

Installed Pygame by installing the following files located at:

http://pythonmac.org/packages/py25-fat/index.html


There isn't a pygame package for python 2.5 at that page...

I am not aware of a prebuilt pygame for python 2.5 for Mac OSX (I use
python 2.4 on mac for that reason)

If you want to tackle building it, there are some instructions here:
http://www.pygame.org/wiki/MacCompile?parent=index


You can use fink (http://finkproject.org/) to install pygame with  
python 2.5. It's also handy for installing other libraries you might  
want (PIL, pyrex, ode, py2app, etc.).


hth,

-Casey