Re: [pygame] Help with pygame
On Mon, Dec 12, 2011 at 4:06 PM, Christopher Night wrote: > 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
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 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 > 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 wrote: > >> >> >> 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 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 >> 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 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
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 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 wrote: > > > 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 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 >>> 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 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] setting + modifying a variable for use across the entire application
""" I'm not sure that works as you expect, though perhaps I've misunderstood what you're doing. Have a look at this and see what you think. Note file2.x stays as 1, but config.mutated changes to 2 c.m reset file1 1 1 c.m incd file3 1 f1 2 f2 2 f3 2 """ #__main__ import file1 as a import file2 print(file2.x) import file1 as b print(file2.x) import file3 as c print(file2.x) print("f1 "+str(a.config.mutated)) print("f2 "+str(b.config.mutated)) print("f3 "+str(c.config.mutated)) #config.py blah="blah" #file1/3 import config try: if(config.mutated): print ("c.m incd "+ __name__) config.mutated+=1 except: config.mutated=1 print ("c.m reset "+ __name__) #file2 import config x=config.mutated #file1/3 import config try: if(config.mutated): print ("c.m incd "+ __name__) config.mutated+=1 except: config.mutated=1 print ("c.m reset "+ __name__)
Re: [pygame] spammity spam on /wiki/patchesandbugs
More! No errors this time. COMPLETED http://www.pygame.org/wiki/ShadowEffects http://www.pygame.org/wiki/SimpleFontManager http://www.pygame.org/wiki/SimpleOpenGL2dClasses http://www.pygame.org/wiki/SmallerRectForSpriteCollision http://www.pygame.org/wiki/SmoothInterpolator http://www.pygame.org/wiki/SpatialHashMap http://www.pygame.org/wiki/SpatialHash_for_Pygame http://www.pygame.org/wiki/Spritesheet http://www.pygame.org/wiki/SubtractRects http://www.pygame.org/wiki/TextureCoordinateArithmetic http://www.pygame.org/wiki/TextWrapping http://www.pygame.org/wiki/toggle_fullscreen http://www.pygame.org/wiki/TTFToBitmapConverter http://www.pygame.org/wiki/WindowResizing http://www.pygame.org/wiki/WxPython On Mon, Dec 12, 2011 at 3:52 PM, Sean Wolfe wrote: > More pages done, and one more ordinal error: > > MIGRATED > http://www.pygame.org/wiki/distributing > http://www.pygame.org/wiki/FrequentlyAskedQuestions > http://www.pygame.org/wiki/Glossary > http://www.pygame.org/wiki/gsoc2009ideas > http://www.pygame.org/wiki/gui > http://www.pygame.org/wiki/gsoc2011ideas > http://www.pygame.org/wiki/guinew > http://www.pygame.org/wiki/Hacking > http://www.pygame.org/wiki/helprequesthowto > http://www.pygame.org/wiki/interviews > http://www.pygame.org/wiki/kubuntu > http://www.pygame.org/wiki/macintosh > http://www.pygame.org/wiki/MacSVNCompile > > ERROR > http://www.pygame.org/wiki/gsoc2009readinglist > > C:\scratchpad\pygame>wiki2bitbucket.py gsoc2009readinglist > Traceback (most recent call last): > File "C:\scratchpad\pygame\wiki2bitbucket.py", line 39, in > creole_version = html2creole(unicode(pretty_html)) > UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position > 5276: ordinal not in range(128) > > > > > On Wed, Dec 7, 2011 at 4:49 PM, René Dudfield wrote: >> Nice work Sean :) >> >> >> >> On Wed, Dec 7, 2011 at 6:50 PM, Sean Wolfe wrote: >>> >>> More! more! Also some problems which are detailed in the ATTEMPTED >>> section below. >>> >>> --- >>> DONE: >>> http://www.pygame.org/wiki/WindowsExecutables_Py2Exe >>> http://www.pygame.org/wiki/syntax >>> http://www.pygame.org/wiki/python3porting >>> http://www.pygame.org/wiki/Pygame2exe >>> http://www.pygame.org/wiki/pgreloaded >>> http://www.pygame.org/wiki/surfarray_profile >>> http://www.pygame.org/wiki/Optimisations >>> http://www.pygame.org/wiki/AlternateJpegBuild >>> http://www.pygame.org/wiki/MinGWBuildingDependenciesByHand >>> http://www.pygame.org/wiki/MingWlibtiffBuild?action=view >>> http://www.pygame.org/wiki/PreparingMinGW >>> >>> >>> HG complained that this was already tracked, but I submitted anyway: >>> http://www.pygame.org/wiki/MingW >>> >>> >>> --- >>> ATTEMPTED BUT FAILED: >>> >>> this says it's already tracked... I didn't override it: >>> http://www.pygame.org/wiki/sandbox >>> >>> This one had a UnicodeDecodeError in wiki2bitbucket.py which I didn't >>> try to fix: >>> http://www.pygame.org/wiki/demo.png >>> >>> This one says already tracked, not sure how to proceed: >>> http://www.pygame.org/wiki/todo >>> >>> >>> More to follow! >>> >>> >>> >>> >>> On Wed, Dec 7, 2011 at 11:35 AM, René Dudfield wrote: >>> > On Wed, Dec 7, 2011 at 3:06 PM, Sean Wolfe wrote: >>> >> >>> >> there are some spam top level pages like 'weight_loss' . Is there an >>> >> interface or keyword to use to delete these top level pages? >>> >> >>> > >>> > Hi, >>> > >>> > we can just ignore those ones, and not add them to the new wiki. >>> > >>> > cheers, >>> >>> >>> >>> -- >>> 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 -- 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] spammity spam on /wiki/patchesandbugs
More pages done, and one more ordinal error: MIGRATED http://www.pygame.org/wiki/distributing http://www.pygame.org/wiki/FrequentlyAskedQuestions http://www.pygame.org/wiki/Glossary http://www.pygame.org/wiki/gsoc2009ideas http://www.pygame.org/wiki/gui http://www.pygame.org/wiki/gsoc2011ideas http://www.pygame.org/wiki/guinew http://www.pygame.org/wiki/Hacking http://www.pygame.org/wiki/helprequesthowto http://www.pygame.org/wiki/interviews http://www.pygame.org/wiki/kubuntu http://www.pygame.org/wiki/macintosh http://www.pygame.org/wiki/MacSVNCompile ERROR http://www.pygame.org/wiki/gsoc2009readinglist C:\scratchpad\pygame>wiki2bitbucket.py gsoc2009readinglist Traceback (most recent call last): File "C:\scratchpad\pygame\wiki2bitbucket.py", line 39, in creole_version = html2creole(unicode(pretty_html)) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 5276: ordinal not in range(128) On Wed, Dec 7, 2011 at 4:49 PM, René Dudfield wrote: > Nice work Sean :) > > > > On Wed, Dec 7, 2011 at 6:50 PM, Sean Wolfe wrote: >> >> More! more! Also some problems which are detailed in the ATTEMPTED >> section below. >> >> --- >> DONE: >> http://www.pygame.org/wiki/WindowsExecutables_Py2Exe >> http://www.pygame.org/wiki/syntax >> http://www.pygame.org/wiki/python3porting >> http://www.pygame.org/wiki/Pygame2exe >> http://www.pygame.org/wiki/pgreloaded >> http://www.pygame.org/wiki/surfarray_profile >> http://www.pygame.org/wiki/Optimisations >> http://www.pygame.org/wiki/AlternateJpegBuild >> http://www.pygame.org/wiki/MinGWBuildingDependenciesByHand >> http://www.pygame.org/wiki/MingWlibtiffBuild?action=view >> http://www.pygame.org/wiki/PreparingMinGW >> >> >> HG complained that this was already tracked, but I submitted anyway: >> http://www.pygame.org/wiki/MingW >> >> >> --- >> ATTEMPTED BUT FAILED: >> >> this says it's already tracked... I didn't override it: >> http://www.pygame.org/wiki/sandbox >> >> This one had a UnicodeDecodeError in wiki2bitbucket.py which I didn't >> try to fix: >> http://www.pygame.org/wiki/demo.png >> >> This one says already tracked, not sure how to proceed: >> http://www.pygame.org/wiki/todo >> >> >> More to follow! >> >> >> >> >> On Wed, Dec 7, 2011 at 11:35 AM, René Dudfield wrote: >> > On Wed, Dec 7, 2011 at 3:06 PM, Sean Wolfe wrote: >> >> >> >> there are some spam top level pages like 'weight_loss' . Is there an >> >> interface or keyword to use to delete these top level pages? >> >> >> > >> > Hi, >> > >> > we can just ignore those ones, and not add them to the new wiki. >> > >> > cheers, >> >> >> >> -- >> 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
[pygame] fix homebrew install instructions link on pygame.org
Hi! On http://pygame.org/download.shtml, under "Macintosh", there is a link to "homebrew install instructions" pointing to https://bitbucket.org/pygame/pygame/issue/82/homebrew-on-leopard-fails-to-install#comment-627494 This should now point to the updated instructions at https://bitbucket.org/pygame/pygame/issue/82/homebrew-on-leopard-fails-to-install#comment-636765 This one just bit me. Cheers, Florian