Re: [pygame] Help? Linux (manlinux) builds for testing.

2018-07-18 Thread Daniel Pope
You can install other interpreters from deadsnakes PPA if you have time for
more thorough testing:

https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa

On Wed, 18 Jul 2018, 12:31 Nicholas H.Tollervey,  wrote:

> Tests all pass for for me on Ubuntu with Python 3.6 and 2.7 :-)
>
> On 17/07/18 13:23, René Dudfield wrote:
> > Hello,
> >
> > There are now linux binary wheels for different cpythons 2.7-3.7.
> >
> > $ python -m *pip install pygame==1.9.4.dev0 --pre* --user
> >
> > If anyone is available for testing something, that would be muchly
> > appreciated.
> >
> > Here are some things that could be tested...
> >
> > python -m pygame.tests
> > python -m pygame.examples.aliens
> > python -m pygame.examples. ...
> >
> > Also, if there is a pygame app that you know, then seeing if that works
> > as before would be a good test.
> >
> >
> >
> > cheerio,
>
>
>


Re: [pygame] Help? Linux (manlinux) builds for testing.

2018-07-18 Thread Nicholas H.Tollervey
Tests all pass for for me on Ubuntu with Python 3.6 and 2.7 :-)

On 17/07/18 13:23, René Dudfield wrote:
> Hello,
> 
> There are now linux binary wheels for different cpythons 2.7-3.7.
> 
> $ python -m *pip install pygame==1.9.4.dev0 --pre* --user
> 
> If anyone is available for testing something, that would be muchly
> appreciated.
> 
> Here are some things that could be tested...
> 
>     python -m pygame.tests
>     python -m pygame.examples.aliens
>     python -m pygame.examples. ...
> 
> Also, if there is a pygame app that you know, then seeing if that works
> as before would be a good test.
> 
> 
> 
> cheerio,




signature.asc
Description: OpenPGP digital signature


Re: [pygame] Help? pygame for python 3.7 windows

2018-07-16 Thread René Dudfield
​Thanks for testing that Ian :)


Re: [pygame] Help? pygame for python 3.7 windows

2018-07-15 Thread Ian Mallett
​Hi,

Install seems to go okay (using amd64 version)​

On Sun, Jul 15, 2018 at 3:37 PM, René Dudfield  wrote:

> python -m pygame.tests
>

pygame 1.9.4.dev0
Hello from the pygame community. https://www.pygame.org/contribute.html
skipping pygame.tests.cdrom_test (tag 'interactive')
skipping pygame.tests.font_test (tag 'subprocess_ignore')
skipping pygame.tests.midi_test (tag 'interactive')
loading pygame.tests.base_test
loading pygame.tests.blit_test
loading pygame.tests.bufferproxy_test
loading pygame.tests.camera_test
loading pygame.tests.color_test
loading pygame.tests.compat_test
loading pygame.tests.cursors_test
loading pygame.tests.display_test
loading pygame.tests.draw_test
loading pygame.tests.event_test
loading pygame.tests.fastevent_test
loading pygame.tests.freetype_test
loading pygame.tests.ftfont_test
loading pygame.tests.gfxdraw_test
loading pygame.tests.image__save_gl_surface_test
loading pygame.tests.image_test
loading pygame.tests.imageext_test
loading pygame.tests.joystick_test
loading pygame.tests.key_test
loading pygame.tests.mask_test
loading pygame.tests.math_test
loading pygame.tests.mixer_music_test
loading pygame.tests.mixer_test
loading pygame.tests.mouse_test
loading pygame.tests.overlay_test
loading pygame.tests.pixelarray_test
loading pygame.tests.pixelcopy_test
loading pygame.tests.rect_test
loading pygame.tests.rwobject_test
loading pygame.tests.scrap_test
loading pygame.tests.sndarray_test
loading pygame.tests.sprite_test
loading pygame.tests.surface_test
loading pygame.tests.surfarray_test
loading pygame.tests.surflock_test
loading pygame.tests.sysfont_test
loading pygame.tests.threads_test
loading pygame.tests.time_test
loading pygame.tests.transform_test





..E.



==
ERROR: test_scrap_put_text (pygame.tests.scrap_test.ScrapModuleTest)
--
Traceback (most recent call last):
  File "C:\dev\Python37\lib\site-packages\pygame\tests\scrap_test.py", line
133,
 in test_scrap_put_text
scrap.put (pygame.SCRAP_TEXT, as_bytes("Another String"))
pygame.error: content could not be placed in clipboard.

--
Ran 712 tests in 58.610s

FAILED (errors=1)


> python -m pygame.examples.aliens
>

​Seems to work.​


> python -m pygame.examples. ...
>

​Didn't find anything amiss.​


> Also, if there is a pygame app that you know, then seeing if that works as
> before would be a good test.
>

​I ran a few of my games. While they seem to work, the output:

pygame 1.9.4.dev0
Hello from the pygame community. https://www.pygame.org/contribute.html

Seems to be hardcoded. This should be removed.

Ian


Re: [pygame] Help? pygame for python 3.7 windows

2018-07-15 Thread René Dudfield
Hi,

here are some things that could be tested...

python -m pygame.tests
python -m pygame.examples.aliens
python -m pygame.examples. ...

Also, if there is a pygame app that you know, then seeing if that works as
before would be a good test.


cheers,





On Sun, Jul 15, 2018 at 11:15 PM, Ian Mallett  wrote:

> ​Anything in-particular that needs testing?
>


Re: [pygame] Help? pygame for python 3.7 windows

2018-07-15 Thread Ian Mallett
​Anything in-particular that needs testing?


Re: [pygame] Help? Alpha changes (regressions?) in 1.9.3 vs 1.9.2?

2018-07-14 Thread René Dudfield
Thanks. So, I guess it's worth fixing before the release. Yes, those are
the same bug reports on the mailing list, and the old bitbucket. But I
guess the change was probably made some years before those reports.

We still need to find when the issue was introduced, and have a test case
for it.




On Sat, Jul 14, 2018 at 3:54 PM, Ian Mallett  wrote:

> ​Hi,
>
> As to finding the commit, can't one find the place where the behavior is
> implemented, and then check the logs for that line/file to see which commit
> introduced it? A trivial search of my email for "SRCALPHA" produces the
> thread "trouble w/ SRCALPHA in 1.9.2-cp27
> ", where
> this same issue was raised (ref. issue #340
> 
> on Bitbucket, by presumably-same user even). At the time no one stepped
> forward to address it significantly.
>
> As to whether the behavior is good, I contend it is bad. SRCALPHA and
> per-surface alpha are *very* different, and confusing them is a classic
> newbie mistake. Now, I don't use the flags myself, and even presuming
> pygame uses them internally, I use per-surface alpha rarely at-most, so it
> doesn't really affect me. But it is semantically incorrect.
>
> Ian
>


Re: [pygame] Help? Alpha changes (regressions?) in 1.9.3 vs 1.9.2?

2018-07-14 Thread Ian Mallett
​Hi,

As to finding the commit, can't one find the place where the behavior is
implemented, and then check the logs for that line/file to see which commit
introduced it? A trivial search of my email for "SRCALPHA" produces the
thread "trouble w/ SRCALPHA in 1.9.2-cp27
", where this
same issue was raised (ref. issue #340

on Bitbucket, by presumably-same user even). At the time no one stepped
forward to address it significantly.

As to whether the behavior is good, I contend it is bad. SRCALPHA and
per-surface alpha are *very* different, and confusing them is a classic
newbie mistake. Now, I don't use the flags myself, and even presuming
pygame uses them internally, I use per-surface alpha rarely at-most, so it
doesn't really affect me. But it is semantically incorrect.

Ian


Re: [pygame] Help testing windows builds?

2016-07-21 Thread René Dudfield
Hellos,

   - There are some new wheels up now. If you have a mac, please `pip
   install pygame`? Note, you can use a virtualenv now, so you don't need to
   install it in your system site-packages.
   - The building of the dependencies is automated using homebrew recipes.
   - The wheels are uploaded to pypi automatically.
   - It should work for Mac OS 10.9, 10.10, and 10.11.

This makes me quite excited as we now have windows, mac, and ubuntu builds
being done by various services.


cheers,


On Sun, Jul 17, 2016 at 3:17 PM, Thomas Kluyver  wrote:

> René has just pushed some Mac wheels to PyPI as well, so anyone on OSX
> 10.11 can also try 'pip install --pre pygame'. There are wheels for Python
> 3.5 and 2.7.
>
> On 16 July 2016 at 15:44, Paul Vincent Craven 
> wrote:
>
>> For some reason my configuration is messed up and I can't run sdist right
>> now. I'll have to look into it when I've got a bit more time.
>>
>> Paul Vincent Craven
>>
>> On Sat, Jul 16, 2016 at 12:31 AM, Thomas Kluyver 
>> wrote:
>>
>>> If you're on windows, yes, you can try a beta version by running:
>>>
>>> pip install --pre pygame
>>>
>>> Paul, any chance of getting an sdist uploaded too? Clone the source and
>>> run python setup.py sdist. That would let people try it on other platforms
>>> too.
>>>
>>> Thomas
>>> On 16 Jul 2016 6:17 a.m., "DiliupG"  wrote:
>>>
 This is so exciting watch. Are we able to download a new version of
 Pygame now? When? From where?

 Diliup Gabadamudalige

 On 16 Jul 2016 4:51 a.m., "Paul Vincent Craven" 
 wrote:

> Ok, files are uploading. First one of the six is up now. Rest should
> be in a few minutes.
>
> Paul Vincent Craven
>
> On Fri, Jul 15, 2016 at 3:28 PM, Thomas Kluyver 
> wrote:
>
>> Thanks Paul :-)
>>
>> I've just pushed a commit to set the version number to 1.9.2b1. This
>> is now building on Appveyor:
>> https://ci.appveyor.com/project/pygame/pygame-temp-m8dun/build/1.0.11
>>
>> Once that has finished - probably in about 5 minutes - could you
>> download the 6 wheels that produces, make an sdist from the source, and
>> upload the lot with twine? I can assemble the 7 files and email them to 
>> you
>> if you prefer.
>>
>> Thomas
>>
>> On 15 July 2016 at 21:09, Paul Vincent Craven 
>> wrote:
>>
>>> I'm happy to upload new files. Shoot an e-mail to the list when you
>>> have a distribution ready.
>>>
>>> I'd give access to you Thomas to upload, but I get a second login
>>> screen when I try, and it doesn't accept my login when I enter it. So I
>>> might have upload permission, but not admin permission?
>>>
>>> Paul Vincent Craven
>>>
>>> On Fri, Jul 15, 2016 at 2:51 PM, Thomas Kluyver 
>>> wrote:
>>>
 It looks like Paul Craven has the upload rights for pygame on
 testpypi. Paul, would you be willing to upload some fresh files? Or to 
 give
 me upload access?

 Alternatively, we could declare the current state 'beta 1' and
 upload it as a prerelease on PyPI. That would need René or Paul to do 
 it.

 Thomas

 On 15 July 2016 at 20:32, Florian Krause <
 siebenhundertz...@gmail.com> wrote:

> In the meantime, it would be very helpful to upload the working
> Windows build to test-PyPi.
>
> On Fri, Jul 15, 2016 at 7:16 PM, Thomas Kluyver 
> wrote:
>
>> On 15 July 2016 at 17:43, Florian Krause <
>> siebenhundertz...@gmail.com> wrote:
>>
>>> That's great! Is there an eta for when the files will be
>>> released at PyPi?
>>>
>>
>> At the moment, the crucial thing that's holding up a release is
>> testing and fixing some issues on Mac. Anyone who might be able to 
>> help
>> with that, see:
>>
>>
>> https://bitbucket.org/pygame/pygame/issues/300/os-x-wheels-dmg-and-zip-builds-with-travis
>>
>> https://bitbucket.org/pygame/pygame/pull-requests/29/mac-sdl-library-fix/diff
>>
>> Thanks,
>> Thomas
>>
>>
>
>
> --
> www.fladd.de - Homepage of Florian Krause
>


>>>
>>
>
>>
>


Re: [pygame] Help testing windows builds?

2016-07-17 Thread Thomas Kluyver
René has just pushed some Mac wheels to PyPI as well, so anyone on OSX
10.11 can also try 'pip install --pre pygame'. There are wheels for Python
3.5 and 2.7.

On 16 July 2016 at 15:44, Paul Vincent Craven  wrote:

> For some reason my configuration is messed up and I can't run sdist right
> now. I'll have to look into it when I've got a bit more time.
>
> Paul Vincent Craven
>
> On Sat, Jul 16, 2016 at 12:31 AM, Thomas Kluyver  wrote:
>
>> If you're on windows, yes, you can try a beta version by running:
>>
>> pip install --pre pygame
>>
>> Paul, any chance of getting an sdist uploaded too? Clone the source and
>> run python setup.py sdist. That would let people try it on other platforms
>> too.
>>
>> Thomas
>> On 16 Jul 2016 6:17 a.m., "DiliupG"  wrote:
>>
>>> This is so exciting watch. Are we able to download a new version of
>>> Pygame now? When? From where?
>>>
>>> Diliup Gabadamudalige
>>>
>>> On 16 Jul 2016 4:51 a.m., "Paul Vincent Craven" 
>>> wrote:
>>>
 Ok, files are uploading. First one of the six is up now. Rest should be
 in a few minutes.

 Paul Vincent Craven

 On Fri, Jul 15, 2016 at 3:28 PM, Thomas Kluyver 
 wrote:

> Thanks Paul :-)
>
> I've just pushed a commit to set the version number to 1.9.2b1. This
> is now building on Appveyor:
> https://ci.appveyor.com/project/pygame/pygame-temp-m8dun/build/1.0.11
>
> Once that has finished - probably in about 5 minutes - could you
> download the 6 wheels that produces, make an sdist from the source, and
> upload the lot with twine? I can assemble the 7 files and email them to 
> you
> if you prefer.
>
> Thomas
>
> On 15 July 2016 at 21:09, Paul Vincent Craven 
> wrote:
>
>> I'm happy to upload new files. Shoot an e-mail to the list when you
>> have a distribution ready.
>>
>> I'd give access to you Thomas to upload, but I get a second login
>> screen when I try, and it doesn't accept my login when I enter it. So I
>> might have upload permission, but not admin permission?
>>
>> Paul Vincent Craven
>>
>> On Fri, Jul 15, 2016 at 2:51 PM, Thomas Kluyver 
>> wrote:
>>
>>> It looks like Paul Craven has the upload rights for pygame on
>>> testpypi. Paul, would you be willing to upload some fresh files? Or to 
>>> give
>>> me upload access?
>>>
>>> Alternatively, we could declare the current state 'beta 1' and
>>> upload it as a prerelease on PyPI. That would need René or Paul to do 
>>> it.
>>>
>>> Thomas
>>>
>>> On 15 July 2016 at 20:32, Florian Krause <
>>> siebenhundertz...@gmail.com> wrote:
>>>
 In the meantime, it would be very helpful to upload the working
 Windows build to test-PyPi.

 On Fri, Jul 15, 2016 at 7:16 PM, Thomas Kluyver 
 wrote:

> On 15 July 2016 at 17:43, Florian Krause <
> siebenhundertz...@gmail.com> wrote:
>
>> That's great! Is there an eta for when the files will be released
>> at PyPi?
>>
>
> At the moment, the crucial thing that's holding up a release is
> testing and fixing some issues on Mac. Anyone who might be able to 
> help
> with that, see:
>
>
> https://bitbucket.org/pygame/pygame/issues/300/os-x-wheels-dmg-and-zip-builds-with-travis
>
> https://bitbucket.org/pygame/pygame/pull-requests/29/mac-sdl-library-fix/diff
>
> Thanks,
> Thomas
>
>


 --
 www.fladd.de - Homepage of Florian Krause

>>>
>>>
>>
>

>


Re: [pygame] Help testing windows builds?

2016-07-16 Thread Paul Vincent Craven
For some reason my configuration is messed up and I can't run sdist right
now. I'll have to look into it when I've got a bit more time.

Paul Vincent Craven

On Sat, Jul 16, 2016 at 12:31 AM, Thomas Kluyver  wrote:

> If you're on windows, yes, you can try a beta version by running:
>
> pip install --pre pygame
>
> Paul, any chance of getting an sdist uploaded too? Clone the source and
> run python setup.py sdist. That would let people try it on other platforms
> too.
>
> Thomas
> On 16 Jul 2016 6:17 a.m., "DiliupG"  wrote:
>
>> This is so exciting watch. Are we able to download a new version of
>> Pygame now? When? From where?
>>
>> Diliup Gabadamudalige
>>
>> On 16 Jul 2016 4:51 a.m., "Paul Vincent Craven" 
>> wrote:
>>
>>> Ok, files are uploading. First one of the six is up now. Rest should be
>>> in a few minutes.
>>>
>>> Paul Vincent Craven
>>>
>>> On Fri, Jul 15, 2016 at 3:28 PM, Thomas Kluyver 
>>> wrote:
>>>
 Thanks Paul :-)

 I've just pushed a commit to set the version number to 1.9.2b1. This is
 now building on Appveyor:
 https://ci.appveyor.com/project/pygame/pygame-temp-m8dun/build/1.0.11

 Once that has finished - probably in about 5 minutes - could you
 download the 6 wheels that produces, make an sdist from the source, and
 upload the lot with twine? I can assemble the 7 files and email them to you
 if you prefer.

 Thomas

 On 15 July 2016 at 21:09, Paul Vincent Craven 
 wrote:

> I'm happy to upload new files. Shoot an e-mail to the list when you
> have a distribution ready.
>
> I'd give access to you Thomas to upload, but I get a second login
> screen when I try, and it doesn't accept my login when I enter it. So I
> might have upload permission, but not admin permission?
>
> Paul Vincent Craven
>
> On Fri, Jul 15, 2016 at 2:51 PM, Thomas Kluyver 
> wrote:
>
>> It looks like Paul Craven has the upload rights for pygame on
>> testpypi. Paul, would you be willing to upload some fresh files? Or to 
>> give
>> me upload access?
>>
>> Alternatively, we could declare the current state 'beta 1' and upload
>> it as a prerelease on PyPI. That would need René or Paul to do it.
>>
>> Thomas
>>
>> On 15 July 2016 at 20:32, Florian Krause > > wrote:
>>
>>> In the meantime, it would be very helpful to upload the working
>>> Windows build to test-PyPi.
>>>
>>> On Fri, Jul 15, 2016 at 7:16 PM, Thomas Kluyver 
>>> wrote:
>>>
 On 15 July 2016 at 17:43, Florian Krause <
 siebenhundertz...@gmail.com> wrote:

> That's great! Is there an eta for when the files will be released
> at PyPi?
>

 At the moment, the crucial thing that's holding up a release is
 testing and fixing some issues on Mac. Anyone who might be able to help
 with that, see:


 https://bitbucket.org/pygame/pygame/issues/300/os-x-wheels-dmg-and-zip-builds-with-travis

 https://bitbucket.org/pygame/pygame/pull-requests/29/mac-sdl-library-fix/diff

 Thanks,
 Thomas


>>>
>>>
>>> --
>>> www.fladd.de - Homepage of Florian Krause
>>>
>>
>>
>

>>>


Re: [pygame] Help testing windows builds?

2016-07-16 Thread Thomas Kluyver
You can do it inside a virtualenv to isolate it from your existing
installation. Weird quirks: hopefully not, but that's what we hope to find
out. :)
On 16 Jul 2016 7:44 a.m., "DiliupG"  wrote:

> Doing this will update my existing Pygame right? and cause all sorts of
> weird quirks right? :) :)
>
> On Sat, Jul 16, 2016 at 11:01 AM, Thomas Kluyver  wrote:
>
>> If you're on windows, yes, you can try a beta version by running:
>>
>> pip install --pre pygame
>>
>> Paul, any chance of getting an sdist uploaded too? Clone the source and
>> run python setup.py sdist. That would let people try it on other platforms
>> too.
>>
>> Thomas
>> On 16 Jul 2016 6:17 a.m., "DiliupG"  wrote:
>>
>>> This is so exciting watch. Are we able to download a new version of
>>> Pygame now? When? From where?
>>>
>>> Diliup Gabadamudalige
>>>
>>> On 16 Jul 2016 4:51 a.m., "Paul Vincent Craven" 
>>> wrote:
>>>
 Ok, files are uploading. First one of the six is up now. Rest should be
 in a few minutes.

 Paul Vincent Craven

 On Fri, Jul 15, 2016 at 3:28 PM, Thomas Kluyver 
 wrote:

> Thanks Paul :-)
>
> I've just pushed a commit to set the version number to 1.9.2b1. This
> is now building on Appveyor:
> https://ci.appveyor.com/project/pygame/pygame-temp-m8dun/build/1.0.11
>
> Once that has finished - probably in about 5 minutes - could you
> download the 6 wheels that produces, make an sdist from the source, and
> upload the lot with twine? I can assemble the 7 files and email them to 
> you
> if you prefer.
>
> Thomas
>
> On 15 July 2016 at 21:09, Paul Vincent Craven 
> wrote:
>
>> I'm happy to upload new files. Shoot an e-mail to the list when you
>> have a distribution ready.
>>
>> I'd give access to you Thomas to upload, but I get a second login
>> screen when I try, and it doesn't accept my login when I enter it. So I
>> might have upload permission, but not admin permission?
>>
>> Paul Vincent Craven
>>
>> On Fri, Jul 15, 2016 at 2:51 PM, Thomas Kluyver 
>> wrote:
>>
>>> It looks like Paul Craven has the upload rights for pygame on
>>> testpypi. Paul, would you be willing to upload some fresh files? Or to 
>>> give
>>> me upload access?
>>>
>>> Alternatively, we could declare the current state 'beta 1' and
>>> upload it as a prerelease on PyPI. That would need René or Paul to do 
>>> it.
>>>
>>> Thomas
>>>
>>> On 15 July 2016 at 20:32, Florian Krause <
>>> siebenhundertz...@gmail.com> wrote:
>>>
 In the meantime, it would be very helpful to upload the working
 Windows build to test-PyPi.

 On Fri, Jul 15, 2016 at 7:16 PM, Thomas Kluyver 
 wrote:

> On 15 July 2016 at 17:43, Florian Krause <
> siebenhundertz...@gmail.com> wrote:
>
>> That's great! Is there an eta for when the files will be released
>> at PyPi?
>>
>
> At the moment, the crucial thing that's holding up a release is
> testing and fixing some issues on Mac. Anyone who might be able to 
> help
> with that, see:
>
>
> https://bitbucket.org/pygame/pygame/issues/300/os-x-wheels-dmg-and-zip-builds-with-travis
>
> https://bitbucket.org/pygame/pygame/pull-requests/29/mac-sdl-library-fix/diff
>
> Thanks,
> Thomas
>
>


 --
 www.fladd.de - Homepage of Florian Krause

>>>
>>>
>>
>

>
>
> --
> Diliup Gabadamudalige
>
> http://www.diliupg.com
> http://soft.diliupg.com/
>
>
> **
> This e-mail is confidential. It may also be legally privileged. If you are
> not the intended recipient or have received it in error, please delete it
> and all copies from your system and notify the sender immediately by return
> e-mail. Any unauthorized reading, reproducing, printing or further
> dissemination of this e-mail or its contents is strictly prohibited and may
> be unlawful. Internet communications cannot be guaranteed to be timely,
> secure, error or virus-free. The sender does not accept liability for any
> errors or omissions.
>
> **
>
>


Re: [pygame] Help testing windows builds?

2016-07-16 Thread DiliupG
Doing this will update my existing Pygame right? and cause all sorts of
weird quirks right? :) :)

On Sat, Jul 16, 2016 at 11:01 AM, Thomas Kluyver  wrote:

> If you're on windows, yes, you can try a beta version by running:
>
> pip install --pre pygame
>
> Paul, any chance of getting an sdist uploaded too? Clone the source and
> run python setup.py sdist. That would let people try it on other platforms
> too.
>
> Thomas
> On 16 Jul 2016 6:17 a.m., "DiliupG"  wrote:
>
>> This is so exciting watch. Are we able to download a new version of
>> Pygame now? When? From where?
>>
>> Diliup Gabadamudalige
>>
>> On 16 Jul 2016 4:51 a.m., "Paul Vincent Craven" 
>> wrote:
>>
>>> Ok, files are uploading. First one of the six is up now. Rest should be
>>> in a few minutes.
>>>
>>> Paul Vincent Craven
>>>
>>> On Fri, Jul 15, 2016 at 3:28 PM, Thomas Kluyver 
>>> wrote:
>>>
 Thanks Paul :-)

 I've just pushed a commit to set the version number to 1.9.2b1. This is
 now building on Appveyor:
 https://ci.appveyor.com/project/pygame/pygame-temp-m8dun/build/1.0.11

 Once that has finished - probably in about 5 minutes - could you
 download the 6 wheels that produces, make an sdist from the source, and
 upload the lot with twine? I can assemble the 7 files and email them to you
 if you prefer.

 Thomas

 On 15 July 2016 at 21:09, Paul Vincent Craven 
 wrote:

> I'm happy to upload new files. Shoot an e-mail to the list when you
> have a distribution ready.
>
> I'd give access to you Thomas to upload, but I get a second login
> screen when I try, and it doesn't accept my login when I enter it. So I
> might have upload permission, but not admin permission?
>
> Paul Vincent Craven
>
> On Fri, Jul 15, 2016 at 2:51 PM, Thomas Kluyver 
> wrote:
>
>> It looks like Paul Craven has the upload rights for pygame on
>> testpypi. Paul, would you be willing to upload some fresh files? Or to 
>> give
>> me upload access?
>>
>> Alternatively, we could declare the current state 'beta 1' and upload
>> it as a prerelease on PyPI. That would need René or Paul to do it.
>>
>> Thomas
>>
>> On 15 July 2016 at 20:32, Florian Krause > > wrote:
>>
>>> In the meantime, it would be very helpful to upload the working
>>> Windows build to test-PyPi.
>>>
>>> On Fri, Jul 15, 2016 at 7:16 PM, Thomas Kluyver 
>>> wrote:
>>>
 On 15 July 2016 at 17:43, Florian Krause <
 siebenhundertz...@gmail.com> wrote:

> That's great! Is there an eta for when the files will be released
> at PyPi?
>

 At the moment, the crucial thing that's holding up a release is
 testing and fixing some issues on Mac. Anyone who might be able to help
 with that, see:


 https://bitbucket.org/pygame/pygame/issues/300/os-x-wheels-dmg-and-zip-builds-with-travis

 https://bitbucket.org/pygame/pygame/pull-requests/29/mac-sdl-library-fix/diff

 Thanks,
 Thomas


>>>
>>>
>>> --
>>> www.fladd.de - Homepage of Florian Krause
>>>
>>
>>
>

>>>


-- 
Diliup Gabadamudalige

http://www.diliupg.com
http://soft.diliupg.com/

**
This e-mail is confidential. It may also be legally privileged. If you are
not the intended recipient or have received it in error, please delete it
and all copies from your system and notify the sender immediately by return
e-mail. Any unauthorized reading, reproducing, printing or further
dissemination of this e-mail or its contents is strictly prohibited and may
be unlawful. Internet communications cannot be guaranteed to be timely,
secure, error or virus-free. The sender does not accept liability for any
errors or omissions.
**


Re: [pygame] Help testing windows builds?

2016-07-15 Thread Thomas Kluyver
If you're on windows, yes, you can try a beta version by running:

pip install --pre pygame

Paul, any chance of getting an sdist uploaded too? Clone the source and run
python setup.py sdist. That would let people try it on other platforms too.

Thomas
On 16 Jul 2016 6:17 a.m., "DiliupG"  wrote:

> This is so exciting watch. Are we able to download a new version of Pygame
> now? When? From where?
>
> Diliup Gabadamudalige
>
> On 16 Jul 2016 4:51 a.m., "Paul Vincent Craven" 
> wrote:
>
>> Ok, files are uploading. First one of the six is up now. Rest should be
>> in a few minutes.
>>
>> Paul Vincent Craven
>>
>> On Fri, Jul 15, 2016 at 3:28 PM, Thomas Kluyver  wrote:
>>
>>> Thanks Paul :-)
>>>
>>> I've just pushed a commit to set the version number to 1.9.2b1. This is
>>> now building on Appveyor:
>>> https://ci.appveyor.com/project/pygame/pygame-temp-m8dun/build/1.0.11
>>>
>>> Once that has finished - probably in about 5 minutes - could you
>>> download the 6 wheels that produces, make an sdist from the source, and
>>> upload the lot with twine? I can assemble the 7 files and email them to you
>>> if you prefer.
>>>
>>> Thomas
>>>
>>> On 15 July 2016 at 21:09, Paul Vincent Craven 
>>> wrote:
>>>
 I'm happy to upload new files. Shoot an e-mail to the list when you
 have a distribution ready.

 I'd give access to you Thomas to upload, but I get a second login
 screen when I try, and it doesn't accept my login when I enter it. So I
 might have upload permission, but not admin permission?

 Paul Vincent Craven

 On Fri, Jul 15, 2016 at 2:51 PM, Thomas Kluyver 
 wrote:

> It looks like Paul Craven has the upload rights for pygame on
> testpypi. Paul, would you be willing to upload some fresh files? Or to 
> give
> me upload access?
>
> Alternatively, we could declare the current state 'beta 1' and upload
> it as a prerelease on PyPI. That would need René or Paul to do it.
>
> Thomas
>
> On 15 July 2016 at 20:32, Florian Krause 
> wrote:
>
>> In the meantime, it would be very helpful to upload the working
>> Windows build to test-PyPi.
>>
>> On Fri, Jul 15, 2016 at 7:16 PM, Thomas Kluyver 
>> wrote:
>>
>>> On 15 July 2016 at 17:43, Florian Krause <
>>> siebenhundertz...@gmail.com> wrote:
>>>
 That's great! Is there an eta for when the files will be released
 at PyPi?

>>>
>>> At the moment, the crucial thing that's holding up a release is
>>> testing and fixing some issues on Mac. Anyone who might be able to help
>>> with that, see:
>>>
>>>
>>> https://bitbucket.org/pygame/pygame/issues/300/os-x-wheels-dmg-and-zip-builds-with-travis
>>>
>>> https://bitbucket.org/pygame/pygame/pull-requests/29/mac-sdl-library-fix/diff
>>>
>>> Thanks,
>>> Thomas
>>>
>>>
>>
>>
>> --
>> www.fladd.de - Homepage of Florian Krause
>>
>
>

>>>
>>


Re: [pygame] Help testing windows builds?

2016-07-15 Thread DiliupG
This is so exciting watch. Are we able to download a new version of Pygame
now? When? From where?

Diliup Gabadamudalige

On 16 Jul 2016 4:51 a.m., "Paul Vincent Craven" 
wrote:

> Ok, files are uploading. First one of the six is up now. Rest should be in
> a few minutes.
>
> Paul Vincent Craven
>
> On Fri, Jul 15, 2016 at 3:28 PM, Thomas Kluyver  wrote:
>
>> Thanks Paul :-)
>>
>> I've just pushed a commit to set the version number to 1.9.2b1. This is
>> now building on Appveyor:
>> https://ci.appveyor.com/project/pygame/pygame-temp-m8dun/build/1.0.11
>>
>> Once that has finished - probably in about 5 minutes - could you download
>> the 6 wheels that produces, make an sdist from the source, and upload the
>> lot with twine? I can assemble the 7 files and email them to you if you
>> prefer.
>>
>> Thomas
>>
>> On 15 July 2016 at 21:09, Paul Vincent Craven 
>> wrote:
>>
>>> I'm happy to upload new files. Shoot an e-mail to the list when you have
>>> a distribution ready.
>>>
>>> I'd give access to you Thomas to upload, but I get a second login screen
>>> when I try, and it doesn't accept my login when I enter it. So I might have
>>> upload permission, but not admin permission?
>>>
>>> Paul Vincent Craven
>>>
>>> On Fri, Jul 15, 2016 at 2:51 PM, Thomas Kluyver 
>>> wrote:
>>>
 It looks like Paul Craven has the upload rights for pygame on testpypi.
 Paul, would you be willing to upload some fresh files? Or to give me upload
 access?

 Alternatively, we could declare the current state 'beta 1' and upload
 it as a prerelease on PyPI. That would need René or Paul to do it.

 Thomas

 On 15 July 2016 at 20:32, Florian Krause 
 wrote:

> In the meantime, it would be very helpful to upload the working
> Windows build to test-PyPi.
>
> On Fri, Jul 15, 2016 at 7:16 PM, Thomas Kluyver 
> wrote:
>
>> On 15 July 2016 at 17:43, Florian Krause > > wrote:
>>
>>> That's great! Is there an eta for when the files will be released at
>>> PyPi?
>>>
>>
>> At the moment, the crucial thing that's holding up a release is
>> testing and fixing some issues on Mac. Anyone who might be able to help
>> with that, see:
>>
>>
>> https://bitbucket.org/pygame/pygame/issues/300/os-x-wheels-dmg-and-zip-builds-with-travis
>>
>> https://bitbucket.org/pygame/pygame/pull-requests/29/mac-sdl-library-fix/diff
>>
>> Thanks,
>> Thomas
>>
>>
>
>
> --
> www.fladd.de - Homepage of Florian Krause
>


>>>
>>
>


Re: [pygame] Help testing windows builds?

2016-07-15 Thread Paul Vincent Craven
Ok, files are uploading. First one of the six is up now. Rest should be in
a few minutes.

Paul Vincent Craven

On Fri, Jul 15, 2016 at 3:28 PM, Thomas Kluyver  wrote:

> Thanks Paul :-)
>
> I've just pushed a commit to set the version number to 1.9.2b1. This is
> now building on Appveyor:
> https://ci.appveyor.com/project/pygame/pygame-temp-m8dun/build/1.0.11
>
> Once that has finished - probably in about 5 minutes - could you download
> the 6 wheels that produces, make an sdist from the source, and upload the
> lot with twine? I can assemble the 7 files and email them to you if you
> prefer.
>
> Thomas
>
> On 15 July 2016 at 21:09, Paul Vincent Craven 
> wrote:
>
>> I'm happy to upload new files. Shoot an e-mail to the list when you have
>> a distribution ready.
>>
>> I'd give access to you Thomas to upload, but I get a second login screen
>> when I try, and it doesn't accept my login when I enter it. So I might have
>> upload permission, but not admin permission?
>>
>> Paul Vincent Craven
>>
>> On Fri, Jul 15, 2016 at 2:51 PM, Thomas Kluyver  wrote:
>>
>>> It looks like Paul Craven has the upload rights for pygame on testpypi.
>>> Paul, would you be willing to upload some fresh files? Or to give me upload
>>> access?
>>>
>>> Alternatively, we could declare the current state 'beta 1' and upload it
>>> as a prerelease on PyPI. That would need René or Paul to do it.
>>>
>>> Thomas
>>>
>>> On 15 July 2016 at 20:32, Florian Krause 
>>> wrote:
>>>
 In the meantime, it would be very helpful to upload the working Windows
 build to test-PyPi.

 On Fri, Jul 15, 2016 at 7:16 PM, Thomas Kluyver 
 wrote:

> On 15 July 2016 at 17:43, Florian Krause 
> wrote:
>
>> That's great! Is there an eta for when the files will be released at
>> PyPi?
>>
>
> At the moment, the crucial thing that's holding up a release is
> testing and fixing some issues on Mac. Anyone who might be able to help
> with that, see:
>
>
> https://bitbucket.org/pygame/pygame/issues/300/os-x-wheels-dmg-and-zip-builds-with-travis
>
> https://bitbucket.org/pygame/pygame/pull-requests/29/mac-sdl-library-fix/diff
>
> Thanks,
> Thomas
>
>


 --
 www.fladd.de - Homepage of Florian Krause

>>>
>>>
>>
>


Re: [pygame] Help testing windows builds?

2016-07-15 Thread Paul Vincent Craven
Ok, it will take me an hour or two before I've got time.

Paul Vincent Craven

On Fri, Jul 15, 2016 at 3:28 PM, Thomas Kluyver  wrote:

> Thanks Paul :-)
>
> I've just pushed a commit to set the version number to 1.9.2b1. This is
> now building on Appveyor:
> https://ci.appveyor.com/project/pygame/pygame-temp-m8dun/build/1.0.11
>
> Once that has finished - probably in about 5 minutes - could you download
> the 6 wheels that produces, make an sdist from the source, and upload the
> lot with twine? I can assemble the 7 files and email them to you if you
> prefer.
>
> Thomas
>
> On 15 July 2016 at 21:09, Paul Vincent Craven 
> wrote:
>
>> I'm happy to upload new files. Shoot an e-mail to the list when you have
>> a distribution ready.
>>
>> I'd give access to you Thomas to upload, but I get a second login screen
>> when I try, and it doesn't accept my login when I enter it. So I might have
>> upload permission, but not admin permission?
>>
>> Paul Vincent Craven
>>
>> On Fri, Jul 15, 2016 at 2:51 PM, Thomas Kluyver  wrote:
>>
>>> It looks like Paul Craven has the upload rights for pygame on testpypi.
>>> Paul, would you be willing to upload some fresh files? Or to give me upload
>>> access?
>>>
>>> Alternatively, we could declare the current state 'beta 1' and upload it
>>> as a prerelease on PyPI. That would need René or Paul to do it.
>>>
>>> Thomas
>>>
>>> On 15 July 2016 at 20:32, Florian Krause 
>>> wrote:
>>>
 In the meantime, it would be very helpful to upload the working Windows
 build to test-PyPi.

 On Fri, Jul 15, 2016 at 7:16 PM, Thomas Kluyver 
 wrote:

> On 15 July 2016 at 17:43, Florian Krause 
> wrote:
>
>> That's great! Is there an eta for when the files will be released at
>> PyPi?
>>
>
> At the moment, the crucial thing that's holding up a release is
> testing and fixing some issues on Mac. Anyone who might be able to help
> with that, see:
>
>
> https://bitbucket.org/pygame/pygame/issues/300/os-x-wheels-dmg-and-zip-builds-with-travis
>
> https://bitbucket.org/pygame/pygame/pull-requests/29/mac-sdl-library-fix/diff
>
> Thanks,
> Thomas
>
>


 --
 www.fladd.de - Homepage of Florian Krause

>>>
>>>
>>
>


Re: [pygame] Help testing windows builds?

2016-07-15 Thread Thomas Kluyver
Thanks Paul :-)

I've just pushed a commit to set the version number to 1.9.2b1. This is now
building on Appveyor:
https://ci.appveyor.com/project/pygame/pygame-temp-m8dun/build/1.0.11

Once that has finished - probably in about 5 minutes - could you download
the 6 wheels that produces, make an sdist from the source, and upload the
lot with twine? I can assemble the 7 files and email them to you if you
prefer.

Thomas

On 15 July 2016 at 21:09, Paul Vincent Craven  wrote:

> I'm happy to upload new files. Shoot an e-mail to the list when you have a
> distribution ready.
>
> I'd give access to you Thomas to upload, but I get a second login screen
> when I try, and it doesn't accept my login when I enter it. So I might have
> upload permission, but not admin permission?
>
> Paul Vincent Craven
>
> On Fri, Jul 15, 2016 at 2:51 PM, Thomas Kluyver  wrote:
>
>> It looks like Paul Craven has the upload rights for pygame on testpypi.
>> Paul, would you be willing to upload some fresh files? Or to give me upload
>> access?
>>
>> Alternatively, we could declare the current state 'beta 1' and upload it
>> as a prerelease on PyPI. That would need René or Paul to do it.
>>
>> Thomas
>>
>> On 15 July 2016 at 20:32, Florian Krause 
>> wrote:
>>
>>> In the meantime, it would be very helpful to upload the working Windows
>>> build to test-PyPi.
>>>
>>> On Fri, Jul 15, 2016 at 7:16 PM, Thomas Kluyver 
>>> wrote:
>>>
 On 15 July 2016 at 17:43, Florian Krause 
 wrote:

> That's great! Is there an eta for when the files will be released at
> PyPi?
>

 At the moment, the crucial thing that's holding up a release is testing
 and fixing some issues on Mac. Anyone who might be able to help with that,
 see:


 https://bitbucket.org/pygame/pygame/issues/300/os-x-wheels-dmg-and-zip-builds-with-travis

 https://bitbucket.org/pygame/pygame/pull-requests/29/mac-sdl-library-fix/diff

 Thanks,
 Thomas


>>>
>>>
>>> --
>>> www.fladd.de - Homepage of Florian Krause
>>>
>>
>>
>


Re: [pygame] Help testing windows builds?

2016-07-15 Thread Paul Vincent Craven
I'm happy to upload new files. Shoot an e-mail to the list when you have a
distribution ready.

I'd give access to you Thomas to upload, but I get a second login screen
when I try, and it doesn't accept my login when I enter it. So I might have
upload permission, but not admin permission?

Paul Vincent Craven

On Fri, Jul 15, 2016 at 2:51 PM, Thomas Kluyver  wrote:

> It looks like Paul Craven has the upload rights for pygame on testpypi.
> Paul, would you be willing to upload some fresh files? Or to give me upload
> access?
>
> Alternatively, we could declare the current state 'beta 1' and upload it
> as a prerelease on PyPI. That would need René or Paul to do it.
>
> Thomas
>
> On 15 July 2016 at 20:32, Florian Krause 
> wrote:
>
>> In the meantime, it would be very helpful to upload the working Windows
>> build to test-PyPi.
>>
>> On Fri, Jul 15, 2016 at 7:16 PM, Thomas Kluyver  wrote:
>>
>>> On 15 July 2016 at 17:43, Florian Krause 
>>> wrote:
>>>
 That's great! Is there an eta for when the files will be released at
 PyPi?

>>>
>>> At the moment, the crucial thing that's holding up a release is testing
>>> and fixing some issues on Mac. Anyone who might be able to help with that,
>>> see:
>>>
>>>
>>> https://bitbucket.org/pygame/pygame/issues/300/os-x-wheels-dmg-and-zip-builds-with-travis
>>>
>>> https://bitbucket.org/pygame/pygame/pull-requests/29/mac-sdl-library-fix/diff
>>>
>>> Thanks,
>>> Thomas
>>>
>>>
>>
>>
>> --
>> www.fladd.de - Homepage of Florian Krause
>>
>
>


Re: [pygame] Help testing windows builds?

2016-07-15 Thread Thomas Kluyver
It looks like Paul Craven has the upload rights for pygame on testpypi.
Paul, would you be willing to upload some fresh files? Or to give me upload
access?

Alternatively, we could declare the current state 'beta 1' and upload it as
a prerelease on PyPI. That would need René or Paul to do it.

Thomas

On 15 July 2016 at 20:32, Florian Krause 
wrote:

> In the meantime, it would be very helpful to upload the working Windows
> build to test-PyPi.
>
> On Fri, Jul 15, 2016 at 7:16 PM, Thomas Kluyver  wrote:
>
>> On 15 July 2016 at 17:43, Florian Krause 
>> wrote:
>>
>>> That's great! Is there an eta for when the files will be released at
>>> PyPi?
>>>
>>
>> At the moment, the crucial thing that's holding up a release is testing
>> and fixing some issues on Mac. Anyone who might be able to help with that,
>> see:
>>
>>
>> https://bitbucket.org/pygame/pygame/issues/300/os-x-wheels-dmg-and-zip-builds-with-travis
>>
>> https://bitbucket.org/pygame/pygame/pull-requests/29/mac-sdl-library-fix/diff
>>
>> Thanks,
>> Thomas
>>
>>
>
>
> --
> www.fladd.de - Homepage of Florian Krause
>


Re: [pygame] Help testing windows builds?

2016-07-15 Thread Florian Krause
In the meantime, it would be very helpful to upload the working Windows
build to test-PyPi.

On Fri, Jul 15, 2016 at 7:16 PM, Thomas Kluyver  wrote:

> On 15 July 2016 at 17:43, Florian Krause 
> wrote:
>
>> That's great! Is there an eta for when the files will be released at PyPi?
>>
>
> At the moment, the crucial thing that's holding up a release is testing
> and fixing some issues on Mac. Anyone who might be able to help with that,
> see:
>
>
> https://bitbucket.org/pygame/pygame/issues/300/os-x-wheels-dmg-and-zip-builds-with-travis
>
> https://bitbucket.org/pygame/pygame/pull-requests/29/mac-sdl-library-fix/diff
>
> Thanks,
> Thomas
>
>


-- 
www.fladd.de - Homepage of Florian Krause


Re: [pygame] Help testing windows builds?

2016-07-15 Thread Thomas Kluyver
On 15 July 2016 at 17:43, Florian Krause 
wrote:

> That's great! Is there an eta for when the files will be released at PyPi?
>

At the moment, the crucial thing that's holding up a release is testing and
fixing some issues on Mac. Anyone who might be able to help with that, see:

https://bitbucket.org/pygame/pygame/issues/300/os-x-wheels-dmg-and-zip-builds-with-travis
https://bitbucket.org/pygame/pygame/pull-requests/29/mac-sdl-library-fix/diff

Thanks,
Thomas


Re: [pygame] Help testing windows builds?

2016-07-15 Thread Florian Krause
That's great! Is there an eta for when the files will be released at PyPi?

On Sat, Jun 18, 2016 at 11:55 AM, Thomas Kluyver  wrote:

> On 18 June 2016 at 10:16, René Dudfield  wrote:
>
>> Thanks to Paul, Leonard, Thomas (and others I've forgot... sorry!) there
>> are automated windows wheels.
>> https://ci.appveyor.com/project/pygame/pygame-temp-m8dun
>>
>
> I know it's not immediately obvious how to get and install pygame from
> that page. So here's a quick guide:
>
> 1. Pick the version of Python you can test. We're building Pygame for
> Python 3.5, 3.4 and 2.7, and for 32 and 64 bit Python (you need to get the
> build matching your Python bitness - you may have 32-bit Python even if
> Windows is 64-bit).
> 2. In the relevant build, click the artifacts tab and download the .whl
> file.
> 3. Install it from the command prompt by running: pip install
> pygame-(...).whl
>
> These steps are only necessary for testing the unreleased version. When
> pygame 1.9.2 is released, you'll be able to 'pip install pygame' and get it
> from PyPI.
>
> Thanks in advance for your help!
>
> Thomas
>



-- 
www.fladd.de - Homepage of Florian Krause


Re: [pygame] Help testing windows builds?

2016-06-18 Thread Thomas Kluyver
On 18 June 2016 at 10:16, René Dudfield  wrote:

> Thanks to Paul, Leonard, Thomas (and others I've forgot... sorry!) there
> are automated windows wheels.
> https://ci.appveyor.com/project/pygame/pygame-temp-m8dun
>

I know it's not immediately obvious how to get and install pygame from that
page. So here's a quick guide:

1. Pick the version of Python you can test. We're building Pygame for
Python 3.5, 3.4 and 2.7, and for 32 and 64 bit Python (you need to get the
build matching your Python bitness - you may have 32-bit Python even if
Windows is 64-bit).
2. In the relevant build, click the artifacts tab and download the .whl
file.
3. Install it from the command prompt by running: pip install
pygame-(...).whl

These steps are only necessary for testing the unreleased version. When
pygame 1.9.2 is released, you'll be able to 'pip install pygame' and get it
from PyPI.

Thanks in advance for your help!

Thomas


RE: [pygame] Help me!

2015-07-07 Thread Oliver Nichol
You may be right. I was running 64 bit python and 32 bit pygame.

 

From: owner-pygame-us...@seul.org [mailto:owner-pygame-us...@seul.org] On
Behalf Of DR0ID
Sent: 05 July 2015 16:39
To: pygame-users@seul.org
Subject: Re: [pygame] Help me!

 

On 2015-07-05 13:11, Oliver Nichol wrote:

Roght I know I already made a thread but  this has more info. I have windows
7 64 bit and am running python 3.2. I have installed pygame and the
installer ran fine but this is what happens when I try to start it:

 

Python 3.2.5 (default, May 15 2013, 23:07:10) [MSC v.1500 64 bit (AMD64)] on
win32

Type copyright, credits or license() for more information.

 from pygame import *

Traceback (most recent call last):

  File pyshell#0, line 1, in module

from pygame import *

  File C:\Python32\lib\site-packages\pygame\__init__.py, line 95, in
module

from pygame.base import *

ImportError: DLL load failed: %1 is not a valid Win32 application.

 

 

Please help me fix this problem!


Hi

Make sure that your python and pygame version have the same bit-ness (64 bit
python can't load pygame compiled for 32 bit and vice versa).

The only pygame 64 bit Version I know can be found here:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame


Hope that helps.

~DR0ID



Re: [pygame] Help me!

2015-07-05 Thread DR0ID

On 2015-07-05 13:11, Oliver Nichol wrote:


Roght I know I already made a thread but this has more info. I have 
windows 7 64 bit and am running python 3.2. I have installed pygame 
and the installer ran fine but this is what happens when I try to 
start it:


Python 3.2.5 (default, May 15 2013, 23:07:10) [MSC v.1500 64 bit 
(AMD64)] on win32


Type copyright, credits or license() for more information.

 from pygame import *

Traceback (most recent call last):

  File pyshell#0, line 1, in module

from pygame import *

  File C:\Python32\lib\site-packages\pygame\__init__.py, line 95, in 
module


from pygame.base import *

ImportError: DLL load failed: %1 is not a valid Win32 application.



Please help me fix this problem!



Hi

Make sure that your python and pygame version have the same bit-ness (64 
bit python can't load pygame compiled for 32 bit and vice versa).


The only pygame 64 bit Version I know can be found here: 
http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame



Hope that helps.

~DR0ID


Re: [pygame] Help me!

2015-06-28 Thread Ian Mallett
​Sounds like a Windows variety. I'm not sure why you'd expect it to appear
in the start menu, though. It's an API, not a program.

You can check if PyGame is installed by opening a Python terminal (Python
IDLE, probably), typing import pygame, and then waiting to see if it
barfs.


RE: [pygame] Help me!

2015-06-28 Thread Oliver Nichol
Thank you. Wait a sec, ill check

 

From: owner-pygame-us...@seul.org [mailto:owner-pygame-us...@seul.org] On 
Behalf Of Ian Mallett
Sent: 28 June 2015 17:30
To: pygame-users@seul.org
Subject: Re: [pygame] Help me!

 

​Sounds like a Windows variety. I'm not sure why you'd expect it to appear in 
the start menu, though. It's an API, not a program.

You can check if PyGame is installed by opening a Python terminal (Python IDLE, 
probably), typing import pygame, and then waiting to see if it barfs.



Re: [pygame] Help me!

2015-06-28 Thread Wout Goud
Which OS are you using? How do you try to install it? (pip or easy_install
or ...)
Op 28 jun. 2015 10:45 schreef Oliver Nichol olivernic...@outlook.com
het volgende:

 Hello, I am trying to install pygame for python 3.2 but it is not working.
 I am trying to repair it by reinstalling but it never appears in the start
 menu. Please help!



Re: [pygame] Help me!

2015-06-28 Thread tom arnall
Hi Oliver,

Please describe exactly the procedure which is failing. By exactly I
mean the text which you are entering and the words which the system is
displaying. It will make it much easier for us to help you, as well as
encourage us to do so.

I often find that creating such a description enables me to observe
more closely what I am doing and to see why it is causing a problem.

Regards,

Tom Arnall
Baja Norte


-- 
Faced with the possibility of its extinction, every species finds
within itself powers unimaginable in the days of its complacency.








On 6/28/15, Oliver Nichol olivernicholoutlook.com wrote:
 Hello, I am trying to install pygame for python 3.2 but it is not working.
 I
 am trying to repair it by reinstalling but it never appears in the start
 menu. Please help!




Re: [pygame] Help me!

2015-06-28 Thread tom arnall
Paul,

Sorry for the mix up. I just noticed it was you who responded and not
Oliver. Suggestion unchanged, but let me add a detail to it. Make sure
that the description of the procedure includes the responses of the
system to the user's actions. If you follow my advice, I'd very much
appreciate seeing a copy of the instructions you produce.

Regards,

T


-- 
They try to make the words of sounds and things their property and use
them to divide us. But they will never own the words in our eyes.


On 6/28/15, Paul Vincent Craven paulcravenfamily.com wrote:
 There are directions, along with a video walk-through here:

 http://programarcadegames.com/index.phpchapterforewordlangensection_0

 Paul Vincent Craven

 On Sun, Jun 28, 2015 at 12:54 PM, tom arnall kloro2...@gmail.com wrote:

 Hi Oliver,

 Please describe exactly the procedure which is failing. By exactly I
 mean the text which you are entering and the words which the system is
 displaying. It will make it much easier for us to help you, as well as
 encourage us to do so.

 I often find that creating such a description enables me to observe
 more closely what I am doing and to see why it is causing a problem.

 Regards,

 Tom Arnall
 Baja Norte


 --
 Faced with the possibility of its extinction, every species finds
 within itself powers unimaginable in the days of its complacency.








 On 6/28/15, Oliver Nichol olivernicholoutlook.com wrote:
  Hello, I am trying to install pygame for python 3.2 but it is not
 working.
  I
  am trying to repair it by reinstalling but it never appears in the
  start
  menu. Please help!
 
 




Re: [pygame] Help me!

2015-06-28 Thread Paul Vincent Craven
There are directions, along with a video walk-through here:

http://programarcadegames.com/index.php?chapter=forewordlang=en#section_0

Paul Vincent Craven

On Sun, Jun 28, 2015 at 12:54 PM, tom arnall kloro2...@gmail.com wrote:

 Hi Oliver,

 Please describe exactly the procedure which is failing. By exactly I
 mean the text which you are entering and the words which the system is
 displaying. It will make it much easier for us to help you, as well as
 encourage us to do so.

 I often find that creating such a description enables me to observe
 more closely what I am doing and to see why it is causing a problem.

 Regards,

 Tom Arnall
 Baja Norte


 --
 Faced with the possibility of its extinction, every species finds
 within itself powers unimaginable in the days of its complacency.








 On 6/28/15, Oliver Nichol olivernicholoutlook.com wrote:
  Hello, I am trying to install pygame for python 3.2 but it is not
 working.
  I
  am trying to repair it by reinstalling but it never appears in the start
  menu. Please help!
 
 



Re: [pygame] Help me!

2015-06-28 Thread tom arnall
Hi Oliver!

Providing us with the set of instructions on the web page is a good
start. Now let me suggest what may turn out to be a giant step forward
from it.

Use the information on the web page to create a text-only set of
instructions for the procedure. Then carefully follow (and probably
revise) the instructions. This may be overkill for the problem at
hand, but the ability to create a completely accurate set of
instructions for a procedure is extremely useful in dealing with many
of the problems which we encounter in our efforts to get them ones a
zeros to behave. You wdn't start writing code without doing the
pseudo-code first, right? At any rate, try writing the instructions. I
think you will find the solution to the installation problem if you do
so.

But I need to solve this problem now! And why is this guy being such
a priss? That may come to yr mind as you read this advice. I totally
understand. I know a lot of competent systems builders. We all suffer
from that state of mind now and then.

I hope very much I've helped you,

Tom

-- 
Faced with the possibility of its extinction, every species finds
within itself powers unimaginable in the days of its complacency.






On 6/28/15, Paul Vincent Craven paulcravenfamily.com wrote:
 There are directions, along with a video walk-through here:

 http://programarcadegames.com/index.phpchapterforewordlangensection_0

 Paul Vincent Craven

 On Sun, Jun 28, 2015 at 12:54 PM, tom arnall kloro2...@gmail.com wrote:

 Hi Oliver,

 Please describe exactly the procedure which is failing. By exactly I
 mean the text which you are entering and the words which the system is
 displaying. It will make it much easier for us to help you, as well as
 encourage us to do so.

 I often find that creating such a description enables me to observe
 more closely what I am doing and to see why it is causing a problem.

 Regards,

 Tom Arnall
 Baja Norte


 --
 Faced with the possibility of its extinction, every species finds
 within itself powers unimaginable in the days of its complacency.








 On 6/28/15, Oliver Nichol olivernicholoutlook.com wrote:
  Hello, I am trying to install pygame for python 3.2 but it is not
 working.
  I
  am trying to repair it by reinstalling but it never appears in the
  start
  menu. Please help!
 
 




Re: [pygame] help subscribing to pygame-users

2014-01-28 Thread René Dudfield
Hi,

direct them to me if you want.

First check that the posts are not showing up on one of the mirrors:
http://www.pygame.org/wiki/info

The need to send an email to pygame-users@seul.org

In the body of the message write:
subscribe pygame-users


cheers,




On Mon, Jan 27, 2014 at 6:12 PM, Christopher Night
cosmologi...@gmail.comwrote:

 Hi, I'm talking with someone on the /r/pygame subreddit who's having
 trouble signing up for this mailing list 
 (linkhttp://www.reddit.com/r/pygame/comments/1w1y20/unable_to_make_an_account_on_your_website/).
 They say they followed the subscribe process but their emails are still not
 showing up on the list. Who should I direct them to?

 Thanks,
 Christopher



Re: [pygame] help with float issue

2012-11-08 Thread Peter Finlayson


On 09/11/2012 08:19, nick2003 wrote:

def updateVelocity(self):
'''calculates the velocity/movement to be done on x and y 
during move
method'''
#update velocity
vx = math.cos( self.heading )* self.speed
vy = math.sin( self.heading )* self.speed

self.velocity = (vx , vy )


Hi,

Because this is a fragment of your code, it is difficult to speak definitively.

It looks like you are setting a taking the intended destination of your character and turning it into a heading. I 
suspect that is where your error is. Your character is walking near the destination, and then past it, because the 
bearing you are using is not accurate.


Either there is a bug in your .destination - .heading code, or the .heading is 
not exact enough.

Regards,
Peter Finlayson



Re: [pygame] help with clock

2012-05-10 Thread Nicholas Seward
One solution would be to draw the clock flipped over the x axis and mirror
your surface back before the flip.  This will make the top be rock steady
but the ends will now be jerky.  You could definitely make both ends smooth
but you would have to simulate the drawing of the arc through a series of
lines.  This will give you some more problems due to the lack of sub
pixel support.  You could use aaline for sub pixel support but you would
have to be mean to the processor to get a nice filled in arc.  Drawing
might be better achieved through another library.  pycairo looks
very promising.

http://www.pjblog.net/index.php?post/2006/06/23/144-using-pycairo-with-pygame-surface


On Tue, May 8, 2012 at 10:30 PM, Silver rockac...@gmail.com wrote:

 I wrote a small clock program that I might use if it turns out well, but
 I am having a small issue where the top of the arcs that grow over time
 shifts when I would like it to stay still. Does anyone know how to
 achieve this?



Re: [pygame] HELP PLEASE: sprite collision - object not iterable error

2012-02-21 Thread Radomir Dopieralski
On Tue, Feb 21, 2012 at 02:47, sc...@scottolling.com
sc...@scottolling.com wrote:
 We're having a problem with the code below, which is returning this error:


 player = Player('Player.png', [10,10], [50, 50])
 monster = Monster('Monster.png', [7,5], [7,5])
 MGroup = pygame.sprite.Group(monster)
 PGroup = pygame.sprite.Group(player)

You want to pass iterables here:

MGroup = pygame.sprite.Group([monster])
PGroup = pygame.sprite.Group([player])


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 needed on creating snake n ladder game

2011-05-08 Thread Jake b
Where are you started / stuck?
Breaking a problem into smaller pieces can make it easier to solve.

example:
1. draw empty board
2. draw player on square X
3. player input, dice.
4. turn taking
5. 'ladder' tiles save the tile id of the square to slide down to


On Mon, May 9, 2011 at 12:46 AM, Mr. Singh list.subscri...@gmail.comwrote:

 Can anybody help me creating snake and ladder game algorithm?




-- 
Jake


Re: [pygame] Help with pygame.transform.threshold

2011-03-04 Thread René Dudfield
Hi,

I think it is a bug.

If you have change_return = 1, then it compares your color (RED) to each
pixel in surface2, and makes the pixels in surface1 (WHITE) which are within
the threadhold (0,0,0) of (RED). However since you have inverse=True, it
makes the pixels that are not within the threshold of RED WHITE.

Is that what you wanted?

Really, the function should work by passing in None... however it seems to
require a Surface there when you're not using it.



On Fri, Mar 4, 2011 at 1:45 AM, Thor Julsrud thrst...@gmail.com wrote:

 Hi!
 I'm trying to use the threshold function in a roguelike to get appropriate
 background and foreground colors for tiles (simulating ASCII). I've simply
 used pygame.transform.threshold(surface1, surface2, WHITE, (0,0,0), RED, 1,
 None, True).
 However, it keeps complaining TypeError: must be pygame.Surface, not
 None.
 If I change the None to a Surface it works, but obviously not the way I
 intended to use the function... Is this simply a bug, or am I doing
 something
 wrong?
 Thanks.




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 - Events

2009-11-17 Thread Thiago Chaves
Sure, share the code.

-Thiago

On Tue, Nov 17, 2009 at 6:26 PM, Thiago Petruccelli
thiagopetrucce...@gmail.com wrote:
 Hi!

 I am making a game in wich the player has to fill an area with tiles. It's
 an educational game. But I got a problem with pygame events... Actually I
 think it's a simple problem, but I don't know how to solve.

 There are two functionalities for the left click of the mouse: the first is
 to put a tile in the area, when dragging one tile, and the other is to
 remove one tile of the area (when not dragging). The problem is that, when I
 put both codes together, the two things happen at the same time - it puts
 the tile and then removes it. I've tried to block the removal of the tile
 setting a variable, placed, which blocks the action of removing the tile
 until the next event handling. But it didn't work.

 Can someone help me solve this?

 Thanks in advance,
 --
 Thiago Henrique Petruccelli



Re: [pygame] Help - Events

2009-11-17 Thread Henrique Nakashima
When you get a mouse button down event, store the mouse location.

When you get a mouse button up event, check if the cursor location in
the mouse up event is the same as the location in the last mouse
button down event. If so, handle the removal. Else, handle the
dragging.

Hope this helps you.

On Tue, Nov 17, 2009 at 14:26, Thiago Petruccelli
thiagopetrucce...@gmail.com wrote:
 Hi!

 I am making a game in wich the player has to fill an area with tiles. It's
 an educational game. But I got a problem with pygame events... Actually I
 think it's a simple problem, but I don't know how to solve.

 There are two functionalities for the left click of the mouse: the first is
 to put a tile in the area, when dragging one tile, and the other is to
 remove one tile of the area (when not dragging). The problem is that, when I
 put both codes together, the two things happen at the same time - it puts
 the tile and then removes it. I've tried to block the removal of the tile
 setting a variable, placed, which blocks the action of removing the tile
 until the next event handling. But it didn't work.

 Can someone help me solve this?

 Thanks in advance,
 --
 Thiago Henrique Petruccelli



Re: [pygame] Help - Events

2009-11-17 Thread Thiago Petruccelli
ok. :)

this is a function of GameFloor class; the event handler. It puts the tile
in the floor if it's in a valid position:

def handle_events(self, event):
if event.type == MOUSEBUTTONDOWN:
if self.dragging == True:
self.dragging = False

#tests if tile is on a free position
if self.free_position(self.d_tile.rect):
self.tiles.append(self.d_tile)
return True ##tile was succesfully inserted
else:
#tile can't be inserted in this position
self.display.remove(self.d_tile)
return False #tile didn't fit

return True

this is the code that remove the tile, in the main game class (GamePlay)
event handling method:

if not self.floor.dragging: #floor is a GameFloor object

#remove a tile
for i in range(len(self.piso.tiles)):
if self.piso.tiles[i].hit_test():

self.piso.display.remove(self.piso.tiles[i])
self.piso.tiles.remove(self.piso.tiles[i])
else:
if self.floor.handle_events(event) == False:
self.tmp_tile.qt = 1
self.loja.player.add_tile(self.tmp_tile) #gives back
to the player the tile that didn't fit
--
Thiago Henrique Petruccelli


On Tue, Nov 17, 2009 at 2:34 PM, Thiago Chaves shundr...@gmail.com wrote:

 Sure, share the code.

 -Thiago

 On Tue, Nov 17, 2009 at 6:26 PM, Thiago Petruccelli
 thiagopetrucce...@gmail.com wrote:
  Hi!
 
  I am making a game in wich the player has to fill an area with tiles.
 It's
  an educational game. But I got a problem with pygame events... Actually I
  think it's a simple problem, but I don't know how to solve.
 
  There are two functionalities for the left click of the mouse: the first
 is
  to put a tile in the area, when dragging one tile, and the other is to
  remove one tile of the area (when not dragging). The problem is that,
 when I
  put both codes together, the two things happen at the same time - it puts
  the tile and then removes it. I've tried to block the removal of the tile
  setting a variable, placed, which blocks the action of removing the
 tile
  until the next event handling. But it didn't work.
 
  Can someone help me solve this?
 
  Thanks in advance,
  --
  Thiago Henrique Petruccelli
 



Re: [pygame] Help - Events

2009-11-17 Thread Thiago Petruccelli
Henrique, the pŕoblem is that when dragging, the mouse button down don't
need to be held all the time; it's one click to pick the tile and another
one to put it in the area.

--
Thiago Henrique Petruccelli


On Tue, Nov 17, 2009 at 2:51 PM, Thiago Petruccelli 
thiagopetrucce...@gmail.com wrote:

 ok. :)

 this is a function of GameFloor class; the event handler. It puts the tile
 in the floor if it's in a valid position:

 def handle_events(self, event):
 if event.type == MOUSEBUTTONDOWN:
 if self.dragging == True:
 self.dragging = False

 #tests if tile is on a free position
 if self.free_position(self.d_tile.rect):
 self.tiles.append(self.d_tile)
 return True ##tile was succesfully inserted
 else:
 #tile can't be inserted in this position
 self.display.remove(self.d_tile)
 return False #tile didn't fit

 return True

 this is the code that remove the tile, in the main game class (GamePlay)
 event handling method:

 if not self.floor.dragging: #floor is a GameFloor object

 #remove a tile
 for i in range(len(self.piso.tiles)):
 if self.piso.tiles[i].hit_test():

 self.piso.display.remove(self.piso.tiles[i])
 self.piso.tiles.remove(self.piso.tiles[i])
 else:
 if self.floor.handle_events(event) == False:

 self.tmp_tile.qt = 1
 self.loja.player.add_tile(self.tmp_tile) #gives
 back to the player the tile that didn't fit
 --
 Thiago Henrique Petruccelli



 On Tue, Nov 17, 2009 at 2:34 PM, Thiago Chaves shundr...@gmail.comwrote:

 Sure, share the code.

 -Thiago

 On Tue, Nov 17, 2009 at 6:26 PM, Thiago Petruccelli
 thiagopetrucce...@gmail.com wrote:
  Hi!
 
  I am making a game in wich the player has to fill an area with tiles.
 It's
  an educational game. But I got a problem with pygame events... Actually
 I
  think it's a simple problem, but I don't know how to solve.
 
  There are two functionalities for the left click of the mouse: the first
 is
  to put a tile in the area, when dragging one tile, and the other is to
  remove one tile of the area (when not dragging). The problem is that,
 when I
  put both codes together, the two things happen at the same time - it
 puts
  the tile and then removes it. I've tried to block the removal of the
 tile
  setting a variable, placed, which blocks the action of removing the
 tile
  until the next event handling. But it didn't work.
 
  Can someone help me solve this?
 
  Thanks in advance,
  --
  Thiago Henrique Petruccelli
 





Re: [pygame] Help - Events

2009-11-17 Thread Henrique Nakashima
Oh, I see. In this case, I would use a variable 'held' to indicate the
tile that is picked up. 'held' would be None if the no tile is held.

When a mouse down event is received, if there is a piece in 'held'
(held is not None), place it. If 'held' is None, then remove the tile
at the mouse location.

On Tue, Nov 17, 2009 at 14:53, Thiago Petruccelli
thiagopetrucce...@gmail.com wrote:
 Henrique, the pŕoblem is that when dragging, the mouse button down don't
 need to be held all the time; it's one click to pick the tile and another
 one to put it in the area.

 --
 Thiago Henrique Petruccelli


 On Tue, Nov 17, 2009 at 2:51 PM, Thiago Petruccelli
 thiagopetrucce...@gmail.com wrote:

 ok. :)

 this is a function of GameFloor class; the event handler. It puts the tile
 in the floor if it's in a valid position:

 def handle_events(self, event):
         if event.type == MOUSEBUTTONDOWN:
             if self.dragging == True:
                 self.dragging = False

                 #tests if tile is on a free position
                 if self.free_position(self.d_tile.rect):
                     self.tiles.append(self.d_tile)
                     return True ##tile was succesfully inserted
                 else:
                     #tile can't be inserted in this position
                     self.display.remove(self.d_tile)
                     return False #tile didn't fit

         return True

 this is the code that remove the tile, in the main game class (GamePlay)
 event handling method:

                 if not self.floor.dragging: #floor is a GameFloor object

     #remove a tile
                     for i in range(len(self.piso.tiles)):
                         if self.piso.tiles[i].hit_test():

                             self.piso.display.remove(self.piso.tiles[i])
                             self.piso.tiles.remove(self.piso.tiles[i])
     else:
                     if self.floor.handle_events(event) == False:

                         self.tmp_tile.qt = 1
                         self.loja.player.add_tile(self.tmp_tile) #gives
 back to the player the tile that didn't fit
 --
 Thiago Henrique Petruccelli


 On Tue, Nov 17, 2009 at 2:34 PM, Thiago Chaves shundr...@gmail.com
 wrote:

 Sure, share the code.

 -Thiago

 On Tue, Nov 17, 2009 at 6:26 PM, Thiago Petruccelli
 thiagopetrucce...@gmail.com wrote:
  Hi!
 
  I am making a game in wich the player has to fill an area with tiles.
  It's
  an educational game. But I got a problem with pygame events... Actually
  I
  think it's a simple problem, but I don't know how to solve.
 
  There are two functionalities for the left click of the mouse: the
  first is
  to put a tile in the area, when dragging one tile, and the other is to
  remove one tile of the area (when not dragging). The problem is that,
  when I
  put both codes together, the two things happen at the same time - it
  puts
  the tile and then removes it. I've tried to block the removal of the
  tile
  setting a variable, placed, which blocks the action of removing the
  tile
  until the next event handling. But it didn't work.
 
  Can someone help me solve this?
 
  Thanks in advance,
  --
  Thiago Henrique Petruccelli
 





Re: [pygame] Help - Events

2009-11-17 Thread Thiago Petruccelli
so, I kind of did that. But the var name is dragging instead of held. when
dragging is true, it didnt run the code of removing. Else, it checks and
removes. But what happens is that it first puts the tile, and then removes
it, with the same click... I thought the mousebuttondown was still on the
event queue so I tried to clear it, also without succes...
--
Thiago Henrique Petruccelli


On Tue, Nov 17, 2009 at 2:59 PM, Henrique Nakashima 
henrique.nakash...@gmail.com wrote:

 Oh, I see. In this case, I would use a variable 'held' to indicate the
 tile that is picked up. 'held' would be None if the no tile is held.

 When a mouse down event is received, if there is a piece in 'held'
 (held is not None), place it. If 'held' is None, then remove the tile
 at the mouse location.

 On Tue, Nov 17, 2009 at 14:53, Thiago Petruccelli
 thiagopetrucce...@gmail.com wrote:
  Henrique, the pŕoblem is that when dragging, the mouse button down don't
  need to be held all the time; it's one click to pick the tile and another
  one to put it in the area.
 
  --
  Thiago Henrique Petruccelli
 
 
  On Tue, Nov 17, 2009 at 2:51 PM, Thiago Petruccelli
  thiagopetrucce...@gmail.com wrote:
 
  ok. :)
 
  this is a function of GameFloor class; the event handler. It puts the
 tile
  in the floor if it's in a valid position:
 
  def handle_events(self, event):
  if event.type == MOUSEBUTTONDOWN:
  if self.dragging == True:
  self.dragging = False
 
  #tests if tile is on a free position
  if self.free_position(self.d_tile.rect):
  self.tiles.append(self.d_tile)
  return True ##tile was succesfully inserted
  else:
  #tile can't be inserted in this position
  self.display.remove(self.d_tile)
  return False #tile didn't fit
 
  return True
 
  this is the code that remove the tile, in the main game class (GamePlay)
  event handling method:
 
  if not self.floor.dragging: #floor is a GameFloor object
 
  #remove a tile
  for i in range(len(self.piso.tiles)):
  if self.piso.tiles[i].hit_test():
 
  self.piso.display.remove(self.piso.tiles[i])
  self.piso.tiles.remove(self.piso.tiles[i])
  else:
  if self.floor.handle_events(event) == False:
 
  self.tmp_tile.qt = 1
  self.loja.player.add_tile(self.tmp_tile) #gives
  back to the player the tile that didn't fit
  --
  Thiago Henrique Petruccelli
 
 
  On Tue, Nov 17, 2009 at 2:34 PM, Thiago Chaves shundr...@gmail.com
  wrote:
 
  Sure, share the code.
 
  -Thiago
 
  On Tue, Nov 17, 2009 at 6:26 PM, Thiago Petruccelli
  thiagopetrucce...@gmail.com wrote:
   Hi!
  
   I am making a game in wich the player has to fill an area with tiles.
   It's
   an educational game. But I got a problem with pygame events...
 Actually
   I
   think it's a simple problem, but I don't know how to solve.
  
   There are two functionalities for the left click of the mouse: the
   first is
   to put a tile in the area, when dragging one tile, and the other is
 to
   remove one tile of the area (when not dragging). The problem is that,
   when I
   put both codes together, the two things happen at the same time - it
   puts
   the tile and then removes it. I've tried to block the removal of the
   tile
   setting a variable, placed, which blocks the action of removing the
   tile
   until the next event handling. But it didn't work.
  
   Can someone help me solve this?
  
   Thanks in advance,
   --
   Thiago Henrique Petruccelli
  
 
 
 



Re: [pygame] Help - Events

2009-11-17 Thread Thiago Petruccelli
In fact, due to my inexperience in pygame, I didn't know where to treat
events - in the main class of the game or in the objects that the event
affects. So, part of the event handling is in the main class and part in the
objects, what I think is bad practise of programming.

So I also wanted to ask wich is best, handle events in the main class or in
the objects...


--
Thiago Henrique Petruccelli


On Tue, Nov 17, 2009 at 3:04 PM, Thiago Petruccelli 
thiagopetrucce...@gmail.com wrote:

 so, I kind of did that. But the var name is dragging instead of held. when
 dragging is true, it didnt run the code of removing. Else, it checks and
 removes. But what happens is that it first puts the tile, and then removes
 it, with the same click... I thought the mousebuttondown was still on the
 event queue so I tried to clear it, also without succes...
  --
 Thiago Henrique Petruccelli



 On Tue, Nov 17, 2009 at 2:59 PM, Henrique Nakashima 
 henrique.nakash...@gmail.com wrote:

 Oh, I see. In this case, I would use a variable 'held' to indicate the
 tile that is picked up. 'held' would be None if the no tile is held.

 When a mouse down event is received, if there is a piece in 'held'
 (held is not None), place it. If 'held' is None, then remove the tile
 at the mouse location.

 On Tue, Nov 17, 2009 at 14:53, Thiago Petruccelli
 thiagopetrucce...@gmail.com wrote:
  Henrique, the pŕoblem is that when dragging, the mouse button down don't
  need to be held all the time; it's one click to pick the tile and
 another
  one to put it in the area.
 
  --
  Thiago Henrique Petruccelli
 
 
  On Tue, Nov 17, 2009 at 2:51 PM, Thiago Petruccelli
  thiagopetrucce...@gmail.com wrote:
 
  ok. :)
 
  this is a function of GameFloor class; the event handler. It puts the
 tile
  in the floor if it's in a valid position:
 
  def handle_events(self, event):
  if event.type == MOUSEBUTTONDOWN:
  if self.dragging == True:
  self.dragging = False
 
  #tests if tile is on a free position
  if self.free_position(self.d_tile.rect):
  self.tiles.append(self.d_tile)
  return True ##tile was succesfully inserted
  else:
  #tile can't be inserted in this position
  self.display.remove(self.d_tile)
  return False #tile didn't fit
 
  return True
 
  this is the code that remove the tile, in the main game class
 (GamePlay)
  event handling method:
 
  if not self.floor.dragging: #floor is a GameFloor
 object
 
  #remove a tile
  for i in range(len(self.piso.tiles)):
  if self.piso.tiles[i].hit_test():
 
 
 self.piso.display.remove(self.piso.tiles[i])
  self.piso.tiles.remove(self.piso.tiles[i])
  else:
  if self.floor.handle_events(event) == False:
 
  self.tmp_tile.qt = 1
  self.loja.player.add_tile(self.tmp_tile) #gives
  back to the player the tile that didn't fit
  --
  Thiago Henrique Petruccelli
 
 
  On Tue, Nov 17, 2009 at 2:34 PM, Thiago Chaves shundr...@gmail.com
  wrote:
 
  Sure, share the code.
 
  -Thiago
 
  On Tue, Nov 17, 2009 at 6:26 PM, Thiago Petruccelli
  thiagopetrucce...@gmail.com wrote:
   Hi!
  
   I am making a game in wich the player has to fill an area with
 tiles.
   It's
   an educational game. But I got a problem with pygame events...
 Actually
   I
   think it's a simple problem, but I don't know how to solve.
  
   There are two functionalities for the left click of the mouse: the
   first is
   to put a tile in the area, when dragging one tile, and the other is
 to
   remove one tile of the area (when not dragging). The problem is
 that,
   when I
   put both codes together, the two things happen at the same time - it
   puts
   the tile and then removes it. I've tried to block the removal of the
   tile
   setting a variable, placed, which blocks the action of removing
 the
   tile
   until the next event handling. But it didn't work.
  
   Can someone help me solve this?
  
   Thanks in advance,
   --
   Thiago Henrique Petruccelli
  
 
 
 





Re: [pygame] Help - Events

2009-11-17 Thread Russell Cumins
What about checking if the tile of the same type has already been placed
where the mouse is being clicked?

if selectedTile == placedTile:
placedTile.remove()
elif selectedTile != placedTile:
selectedTile.place()


2009/11/17 Thiago Petruccelli thiagopetrucce...@gmail.com

 so, I kind of did that. But the var name is dragging instead of held. when
 dragging is true, it didnt run the code of removing. Else, it checks and
 removes. But what happens is that it first puts the tile, and then removes
 it, with the same click... I thought the mousebuttondown was still on the
 event queue so I tried to clear it, also without succes...
 --
 Thiago Henrique Petruccelli



 On Tue, Nov 17, 2009 at 2:59 PM, Henrique Nakashima 
 henrique.nakash...@gmail.com wrote:

 Oh, I see. In this case, I would use a variable 'held' to indicate the
 tile that is picked up. 'held' would be None if the no tile is held.

 When a mouse down event is received, if there is a piece in 'held'
 (held is not None), place it. If 'held' is None, then remove the tile
 at the mouse location.

 On Tue, Nov 17, 2009 at 14:53, Thiago Petruccelli
 thiagopetrucce...@gmail.com wrote:
  Henrique, the pŕoblem is that when dragging, the mouse button down don't
  need to be held all the time; it's one click to pick the tile and
 another
  one to put it in the area.
 
  --
  Thiago Henrique Petruccelli
 
 
  On Tue, Nov 17, 2009 at 2:51 PM, Thiago Petruccelli
  thiagopetrucce...@gmail.com wrote:
 
  ok. :)
 
  this is a function of GameFloor class; the event handler. It puts the
 tile
  in the floor if it's in a valid position:
 
  def handle_events(self, event):
  if event.type == MOUSEBUTTONDOWN:
  if self.dragging == True:
  self.dragging = False
 
  #tests if tile is on a free position
  if self.free_position(self.d_tile.rect):
  self.tiles.append(self.d_tile)
  return True ##tile was succesfully inserted
  else:
  #tile can't be inserted in this position
  self.display.remove(self.d_tile)
  return False #tile didn't fit
 
  return True
 
  this is the code that remove the tile, in the main game class
 (GamePlay)
  event handling method:
 
  if not self.floor.dragging: #floor is a GameFloor
 object
 
  #remove a tile
  for i in range(len(self.piso.tiles)):
  if self.piso.tiles[i].hit_test():
 
 
 self.piso.display.remove(self.piso.tiles[i])
  self.piso.tiles.remove(self.piso.tiles[i])
  else:
  if self.floor.handle_events(event) == False:
 
  self.tmp_tile.qt = 1
  self.loja.player.add_tile(self.tmp_tile) #gives
  back to the player the tile that didn't fit
  --
  Thiago Henrique Petruccelli
 
 
  On Tue, Nov 17, 2009 at 2:34 PM, Thiago Chaves shundr...@gmail.com
  wrote:
 
  Sure, share the code.
 
  -Thiago
 
  On Tue, Nov 17, 2009 at 6:26 PM, Thiago Petruccelli
  thiagopetrucce...@gmail.com wrote:
   Hi!
  
   I am making a game in wich the player has to fill an area with
 tiles.
   It's
   an educational game. But I got a problem with pygame events...
 Actually
   I
   think it's a simple problem, but I don't know how to solve.
  
   There are two functionalities for the left click of the mouse: the
   first is
   to put a tile in the area, when dragging one tile, and the other is
 to
   remove one tile of the area (when not dragging). The problem is
 that,
   when I
   put both codes together, the two things happen at the same time - it
   puts
   the tile and then removes it. I've tried to block the removal of the
   tile
   setting a variable, placed, which blocks the action of removing
 the
   tile
   until the next event handling. But it didn't work.
  
   Can someone help me solve this?
  
   Thanks in advance,
   --
   Thiago Henrique Petruccelli
  
 
 
 





Re: [pygame] Help - Events

2009-11-17 Thread Thiago Petruccelli
that is interesting... I'll try...
--
Thiago Henrique Petruccelli


On Tue, Nov 17, 2009 at 3:32 PM, Russell Cumins rcum...@googlemail.comwrote:

 What about checking if the tile of the same type has already been placed
 where the mouse is being clicked?

 if selectedTile == placedTile:
 placedTile.remove()
 elif selectedTile != placedTile:
 selectedTile.place()


 2009/11/17 Thiago Petruccelli thiagopetrucce...@gmail.com

 so, I kind of did that. But the var name is dragging instead of held. when
 dragging is true, it didnt run the code of removing. Else, it checks and
 removes. But what happens is that it first puts the tile, and then removes
 it, with the same click... I thought the mousebuttondown was still on the
 event queue so I tried to clear it, also without succes...
  --
 Thiago Henrique Petruccelli



 On Tue, Nov 17, 2009 at 2:59 PM, Henrique Nakashima 
 henrique.nakash...@gmail.com wrote:

 Oh, I see. In this case, I would use a variable 'held' to indicate the
 tile that is picked up. 'held' would be None if the no tile is held.

 When a mouse down event is received, if there is a piece in 'held'
 (held is not None), place it. If 'held' is None, then remove the tile
 at the mouse location.

 On Tue, Nov 17, 2009 at 14:53, Thiago Petruccelli
 thiagopetrucce...@gmail.com wrote:
  Henrique, the pŕoblem is that when dragging, the mouse button down
 don't
  need to be held all the time; it's one click to pick the tile and
 another
  one to put it in the area.
 
  --
  Thiago Henrique Petruccelli
 
 
  On Tue, Nov 17, 2009 at 2:51 PM, Thiago Petruccelli
  thiagopetrucce...@gmail.com wrote:
 
  ok. :)
 
  this is a function of GameFloor class; the event handler. It puts the
 tile
  in the floor if it's in a valid position:
 
  def handle_events(self, event):
  if event.type == MOUSEBUTTONDOWN:
  if self.dragging == True:
  self.dragging = False
 
  #tests if tile is on a free position
  if self.free_position(self.d_tile.rect):
  self.tiles.append(self.d_tile)
  return True ##tile was succesfully inserted
  else:
  #tile can't be inserted in this position
  self.display.remove(self.d_tile)
  return False #tile didn't fit
 
  return True
 
  this is the code that remove the tile, in the main game class
 (GamePlay)
  event handling method:
 
  if not self.floor.dragging: #floor is a GameFloor
 object
 
  #remove a tile
  for i in range(len(self.piso.tiles)):
  if self.piso.tiles[i].hit_test():
 
 
 self.piso.display.remove(self.piso.tiles[i])
  self.piso.tiles.remove(self.piso.tiles[i])
  else:
  if self.floor.handle_events(event) == False:
 
  self.tmp_tile.qt = 1
  self.loja.player.add_tile(self.tmp_tile)
 #gives
  back to the player the tile that didn't fit
  --
  Thiago Henrique Petruccelli
 
 
  On Tue, Nov 17, 2009 at 2:34 PM, Thiago Chaves shundr...@gmail.com
  wrote:
 
  Sure, share the code.
 
  -Thiago
 
  On Tue, Nov 17, 2009 at 6:26 PM, Thiago Petruccelli
  thiagopetrucce...@gmail.com wrote:
   Hi!
  
   I am making a game in wich the player has to fill an area with
 tiles.
   It's
   an educational game. But I got a problem with pygame events...
 Actually
   I
   think it's a simple problem, but I don't know how to solve.
  
   There are two functionalities for the left click of the mouse: the
   first is
   to put a tile in the area, when dragging one tile, and the other is
 to
   remove one tile of the area (when not dragging). The problem is
 that,
   when I
   put both codes together, the two things happen at the same time -
 it
   puts
   the tile and then removes it. I've tried to block the removal of
 the
   tile
   setting a variable, placed, which blocks the action of removing
 the
   tile
   until the next event handling. But it didn't work.
  
   Can someone help me solve this?
  
   Thanks in advance,
   --
   Thiago Henrique Petruccelli
  
 
 
 






Re: [pygame] Help - Events

2009-11-17 Thread Rolf Sievers

I made a little example of drag and drop, not sure if you want that.

# CC0 1.0 Universal
# http://creativecommons.org/publicdomain/zero/1.0/

from sys import exit
from pygame.locals import *
import pygame
pygame.init()

screen = pygame.display.set_mode((640, 480))
clock  = pygame.time.Clock()

# create the rect to dragdrop, center it on the screen
rect = pygame.Rect(0, 0, 100, 100)
rect.center = screen.get_rect().center

draging = None

while True:
   clock.tick(30)
   for e in pygame.event.get():
   if e.type == QUIT:
   pygame.quit()
   exit()
   elif e.type == MOUSEBUTTONDOWN:
   if e.button == 1:
   if draging is None:
   if rect.collidepoint(e.pos): # make sure you 
actually hover the rect
   draging = (rect.centerx-e.pos[0], 
rect.centery-e.pos[1])

   else:
   draging = None
  
   elif e.type == MOUSEMOTION:

   if draging is not None:
   rect.centerx = e.pos[0] + draging[0]
   rect.centery = e.pos[1] + draging[1]
  
   screen.fill((255, 255, 255))

   pygame.draw.rect(screen, (0, 0, 200), rect)
   pygame.display.flip()

# end of CC0 1.0 Universal

Thiago Petruccelli schrieb:

Hi!

I am making a game in wich the player has to fill an area with tiles. 
It's an educational game. But I got a problem with pygame events... 
Actually I think it's a simple problem, but I don't know how to solve.


There are two functionalities for the left click of the mouse: the 
first is to put a tile in the area, when dragging one tile, and the 
other is to remove one tile of the area (when not dragging). The 
problem is that, when I put both codes together, the two things happen 
at the same time - it puts the tile and then removes it. I've tried to 
block the removal of the tile setting a variable, placed, which 
blocks the action of removing the tile until the next event handling. 
But it didn't work.


Can someone help me solve this?

Thanks in advance,
--
Thiago Henrique Petruccelli


Re: [pygame] Help - Events

2009-11-17 Thread Thiago Petruccelli
Thanks Rolf. In fact I was using a different way to drag the tile aroud; do
it inside the MOUSEMOTION if is really better.

I think I'll have to re-write all the event handling in may game, it's
really messy...
--
Thiago Henrique Petruccelli


On Tue, Nov 17, 2009 at 2:51 PM, Rolf Sievers rolf.siev...@lg-bs.de wrote:

 I made a little example of drag and drop, not sure if you want that.

 # CC0 1.0 Universal
 # http://creativecommons.org/publicdomain/zero/1.0/

 from sys import exit
 from pygame.locals import *
 import pygame
 pygame.init()

 screen = pygame.display.set_mode((640, 480))
 clock  = pygame.time.Clock()

 # create the rect to dragdrop, center it on the screen
 rect = pygame.Rect(0, 0, 100, 100)
 rect.center = screen.get_rect().center

 draging = None

 while True:
   clock.tick(30)
   for e in pygame.event.get():
   if e.type == QUIT:
   pygame.quit()
   exit()
   elif e.type == MOUSEBUTTONDOWN:
   if e.button == 1:
   if draging is None:
   if rect.collidepoint(e.pos): # make sure you actually
 hover the rect
   draging = (rect.centerx-e.pos[0],
 rect.centery-e.pos[1])
   else:
   draging = None
 elif e.type == MOUSEMOTION:
   if draging is not None:
   rect.centerx = e.pos[0] + draging[0]
   rect.centery = e.pos[1] + draging[1]
 screen.fill((255, 255, 255))
   pygame.draw.rect(screen, (0, 0, 200), rect)
   pygame.display.flip()

 # end of CC0 1.0 Universal

 Thiago Petruccelli schrieb:

  Hi!

 I am making a game in wich the player has to fill an area with tiles. It's
 an educational game. But I got a problem with pygame events... Actually I
 think it's a simple problem, but I don't know how to solve.

 There are two functionalities for the left click of the mouse: the first
 is to put a tile in the area, when dragging one tile, and the other is to
 remove one tile of the area (when not dragging). The problem is that, when I
 put both codes together, the two things happen at the same time - it puts
 the tile and then removes it. I've tried to block the removal of the tile
 setting a variable, placed, which blocks the action of removing the tile
 until the next event handling. But it didn't work.

 Can someone help me solve this?

 Thanks in advance,
 --
 Thiago Henrique Petruccelli




Re: [pygame] Help - Events

2009-11-17 Thread Thadeus Burgess
I would suggest using my event input wrapper... It will clean up the event
handling ALOT...

http://www.pygame.org/wiki/InputWrapper

-Thadeus




On Tue, Nov 17, 2009 at 12:30 PM, Thiago Petruccelli 
thiagopetrucce...@gmail.com wrote:

 Thanks Rolf. In fact I was using a different way to drag the tile aroud; do
 it inside the MOUSEMOTION if is really better.

 I think I'll have to re-write all the event handling in may game, it's
 really messy...
  --
 Thiago Henrique Petruccelli



 On Tue, Nov 17, 2009 at 2:51 PM, Rolf Sievers rolf.siev...@lg-bs.dewrote:

 I made a little example of drag and drop, not sure if you want that.

 # CC0 1.0 Universal
 # http://creativecommons.org/publicdomain/zero/1.0/

 from sys import exit
 from pygame.locals import *
 import pygame
 pygame.init()

 screen = pygame.display.set_mode((640, 480))
 clock  = pygame.time.Clock()

 # create the rect to dragdrop, center it on the screen
 rect = pygame.Rect(0, 0, 100, 100)
 rect.center = screen.get_rect().center

 draging = None

 while True:
   clock.tick(30)
   for e in pygame.event.get():
   if e.type == QUIT:
   pygame.quit()
   exit()
   elif e.type == MOUSEBUTTONDOWN:
   if e.button == 1:
   if draging is None:
   if rect.collidepoint(e.pos): # make sure you actually
 hover the rect
   draging = (rect.centerx-e.pos[0],
 rect.centery-e.pos[1])
   else:
   draging = None
 elif e.type == MOUSEMOTION:
   if draging is not None:
   rect.centerx = e.pos[0] + draging[0]
   rect.centery = e.pos[1] + draging[1]
 screen.fill((255, 255, 255))
   pygame.draw.rect(screen, (0, 0, 200), rect)
   pygame.display.flip()

 # end of CC0 1.0 Universal

 Thiago Petruccelli schrieb:

  Hi!

 I am making a game in wich the player has to fill an area with tiles.
 It's an educational game. But I got a problem with pygame events... Actually
 I think it's a simple problem, but I don't know how to solve.

 There are two functionalities for the left click of the mouse: the first
 is to put a tile in the area, when dragging one tile, and the other is to
 remove one tile of the area (when not dragging). The problem is that, when I
 put both codes together, the two things happen at the same time - it puts
 the tile and then removes it. I've tried to block the removal of the tile
 setting a variable, placed, which blocks the action of removing the tile
 until the next event handling. But it didn't work.

 Can someone help me solve this?

 Thanks in advance,
 --
 Thiago Henrique Petruccelli





Re: [pygame] Help - Events

2009-11-17 Thread Shadd
Anyway, why not to try using pygame.event.get() instead of the queue for 
that specific function?


Thiago Petruccelli wrote:
Wow. After organizing a little bit the event handling, it worked - the 
way Henrique wrote.


I'll use the input wrapper in the game, it's very useful and organized 
too. :)


Problem solved!

Thanks so much for all your help, you're great.

--
Thiago Henrique Petruccelli


On Tue, Nov 17, 2009 at 4:37 PM, Thadeus Burgess 
thade...@thadeusb.com mailto:thade...@thadeusb.com wrote:


I would suggest using my event input wrapper... It will clean up
the event handling ALOT...

http://www.pygame.org/wiki/InputWrapper

-Thadeus



Re: [pygame] help

2008-10-31 Thread Matt Pearson
yea my python file says it has no console but then when geany runs it, it
still has the console

On Fri, Oct 31, 2008 at 12:58 AM, Patrick Mullen [EMAIL PROTECTED]wrote:

 On Thu, Oct 30, 2008 at 10:55 PM, Matt Pearson [EMAIL PROTECTED]
 wrote:
  how do you get the Win32 console window from popping up when running a
  script?

 If you name your file .pyw it will assume you are handling the
 windowing yourself and will not open a console.



Re: [pygame] help

2008-10-31 Thread pymike
You need the geany console for debugging. If you didn't have it, then you
wouldn't catch any errors ;-)

On Fri, Oct 31, 2008 at 1:08 AM, Matt Pearson [EMAIL PROTECTED] wrote:

 yea my python file says it has no console but then when geany runs it, it
 still has the console


 On Fri, Oct 31, 2008 at 12:58 AM, Patrick Mullen [EMAIL PROTECTED]wrote:

 On Thu, Oct 30, 2008 at 10:55 PM, Matt Pearson [EMAIL PROTECTED]
 wrote:
  how do you get the Win32 console window from popping up when running a
  script?

 If you name your file .pyw it will assume you are handling the
 windowing yourself and will not open a console.





-- 
- pymike
Stop loling into a false sense of hilarity


Re: [pygame] help

2008-10-30 Thread Ian Mallett
You'll have to be more specific.


Re: [pygame] help

2008-10-30 Thread Matt Pearson
srry, just seeing if i have the right address,
so im using python 2.6 and pygame 1.8

When i write out a script and save it, I run it, and all is fine
until i try to close the window, and it freezes and goes to an
unresponsive program, then IDLE tells me this

Traceback (most recent call last):
  File C:\Python26\RectTest.py, line 15, in module
exit()
SystemExit
On Thu, Oct 30, 2008 at 1:36 PM, Ian Mallett [EMAIL PROTECTED] wrote:

 You'll have to be more specific.

import pygame
from pygame.locals import *
from sys import exit

from random import *

pygame.init()
screen = pygame.display.set_mode((640, 480), 0, 32)


while True:

for event in pygame.event.get():
if event.type == QUIT:
exit()
 
screen.lock()
 
for count in range(10):
random_color = (randint(0,255), randint(0,255), randint(0,255))
random_pos = (randint(0,639), randint(0,479))
random_size = (639-randint(random_pos[0],639), 479-randint 
(random_pos[1],479))

pygame.draw.rect(screen, random_color, Rect(random_pos, random_size))
screen.unlock()

pygame.display.update()





Re: [pygame] help

2008-10-30 Thread pymike
Call pygame.quit()  right before the exit() function

hth

On Thu, Oct 30, 2008 at 1:49 PM, Matt Pearson [EMAIL PROTECTED] wrote:

 srry, just seeing if i have the right address,
 so im using python 2.6 and pygame 1.8

 When i write out a script and save it, I run it, and all is fine
 until i try to close the window, and it freezes and goes to an
 unresponsive program, then IDLE tells me this

 Traceback (most recent call last):
   File C:\Python26\RectTest.py, line 15, in module
 exit()
 SystemExit
 On Thu, Oct 30, 2008 at 1:36 PM, Ian Mallett [EMAIL PROTECTED] wrote:

 You'll have to be more specific.





-- 
- pymike
Stop loling into a false sense of hilarity


Re: [pygame] help

2008-10-30 Thread Ian Mallett
Yes, I was thinking that, but the error seems to be a Python exception
(indeed that's what sys.exit() does).  Perhaps the error is Python 2.6
specific? Ian


Re: [pygame] help

2008-10-30 Thread Charlie Nolan
I'm guessing it's working as designed.  Idle assumes you don't want it
to quit, so it catches the exception.
-FM

On Thu, Oct 30, 2008 at 2:30 PM, Ian Mallett [EMAIL PROTECTED] wrote:
 Yes, I was thinking that, but the error seems to be a Python exception
 (indeed that's what sys.exit() does).  Perhaps the error is Python 2.6
 specific?
 Ian


Re: [pygame] help

2008-10-30 Thread claudio canepa
On Thu, Oct 30, 2008 at 5:30 PM, Ian Mallett [EMAIL PROTECTED] wrote:

 Yes, I was thinking that, but the error seems to be a Python exception
 (indeed that's what sys.exit() does).  Perhaps the error is Python 2.6
 specific? Ian

No, it hapens also with 2.4 .
I usually edit with IDLE an run the prog from an OS console to avoid
problems.
--
claxo


Re: [pygame] help

2008-10-30 Thread Matt Pearson
i have done that and while it clears IDLE of the exception it still
has a problem closing the window correctly

On Thu, Oct 30, 2008 at 2:21 PM, pymike [EMAIL PROTECTED] wrote:

 Call pygame.quit()  right before the exit() function

 hth


 On Thu, Oct 30, 2008 at 1:49 PM, Matt Pearson [EMAIL PROTECTED]wrote:

 srry, just seeing if i have the right address,
 so im using python 2.6 and pygame 1.8

 When i write out a script and save it, I run it, and all is fine
 until i try to close the window, and it freezes and goes to an
 unresponsive program, then IDLE tells me this

 Traceback (most recent call last):
   File C:\Python26\RectTest.py, line 15, in module
 exit()
 SystemExit
   On Thu, Oct 30, 2008 at 1:36 PM, Ian Mallett [EMAIL PROTECTED]wrote:

 You'll have to be more specific.





 --
 - pymike
 Stop loling into a false sense of hilarity



Re: [pygame] help

2008-10-30 Thread Matt Pearson
srry it does not clear the exception, i meant to say that it only clears the

exception when i put the loop in a function, still closing problem remains

On Thu, Oct 30, 2008 at 3:49 PM, Matt Pearson [EMAIL PROTECTED] wrote:

 i have done that and while it clears IDLE of the exception it still
 has a problem closing the window correctly

   On Thu, Oct 30, 2008 at 2:21 PM, pymike [EMAIL PROTECTED] wrote:

 Call pygame.quit()  right before the exit() function

 hth


 On Thu, Oct 30, 2008 at 1:49 PM, Matt Pearson [EMAIL PROTECTED]wrote:

 srry, just seeing if i have the right address,
 so im using python 2.6 and pygame 1.8

 When i write out a script and save it, I run it, and all is fine
 until i try to close the window, and it freezes and goes to an
 unresponsive program, then IDLE tells me this

 Traceback (most recent call last):
   File C:\Python26\RectTest.py, line 15, in module
 exit()
 SystemExit
   On Thu, Oct 30, 2008 at 1:36 PM, Ian Mallett [EMAIL PROTECTED]wrote:

 You'll have to be more specific.





 --
 - pymike
 Stop loling into a false sense of hilarity





Re: [pygame] help

2008-10-30 Thread claudio canepa
On Thu, Oct 30, 2008 at 6:51 PM, Matt Pearson [EMAIL PROTECTED] wrote:

 srry it does not clear the exception, i meant to say that it only clears
 the
 exception when i put the loop in a function, still closing problem remains

 On Thu, Oct 30, 2008 at 3:49 PM, Matt Pearson [EMAIL PROTECTED]wrote:

 i have done that and while it clears IDLE of the exception it still
 has a problem closing the window correctly

  On Thu, Oct 30, 2008 at 2:21 PM, pymike [EMAIL PROTECTED] wrote:

 Call pygame.quit()  right before the exit() function

 hth

 On Thu, Oct 30, 2008 at 1:49 PM, Matt Pearson [EMAIL PROTECTED]wrote:

 srry, just seeing if i have the right address,
 so im using python 2.6 and pygame 1.8

 When i write out a script and save it, I run it, and all is fine
 until i try to close the window, and it freezes and goes to an
 unresponsive program, then IDLE tells me this

 Traceback (most recent call last):
   File C:\Python26\RectTest.py, line 15, in module
 exit()
 SystemExit
  On Thu, Oct 30, 2008 at 1:36 PM, Ian Mallett [EMAIL PROTECTED]wrote:

 You'll have to be more specific.





 --
 - pymike
 Stop loling into a false sense of hilarity



 You can try this:
bContinue = True
while bContinue:
...
if xxx:
bContinue=False
pygame.quit()
...
# dont use sys.exit, let execution find the end of file.
EOF
If even that has problems, then out of the loop and before the EOF do
something as
import time
time.wait(1)
that for give pygame some time to do cleanup.
-- untested --
hth
--
claxo


Re: [pygame] help

2008-10-30 Thread Matt Pearson
where do i put bContinue, before my main loop, or do i intergrate it with
the loop

On Thu, Oct 30, 2008 at 4:05 PM, claudio canepa [EMAIL PROTECTED] wrote:



   On Thu, Oct 30, 2008 at 6:51 PM, Matt Pearson [EMAIL PROTECTED]wrote:

 srry it does not clear the exception, i meant to say that it only clears
 the
 exception when i put the loop in a function, still closing problem remains

  On Thu, Oct 30, 2008 at 3:49 PM, Matt Pearson [EMAIL PROTECTED]wrote:

 i have done that and while it clears IDLE of the exception it still
 has a problem closing the window correctly

  On Thu, Oct 30, 2008 at 2:21 PM, pymike [EMAIL PROTECTED] wrote:

 Call pygame.quit()  right before the exit() function

 hth

 On Thu, Oct 30, 2008 at 1:49 PM, Matt Pearson [EMAIL PROTECTED]wrote:

 srry, just seeing if i have the right address,
 so im using python 2.6 and pygame 1.8

 When i write out a script and save it, I run it, and all is fine
 until i try to close the window, and it freezes and goes to an
 unresponsive program, then IDLE tells me this

 Traceback (most recent call last):
   File C:\Python26\RectTest.py, line 15, in module
 exit()
 SystemExit
  On Thu, Oct 30, 2008 at 1:36 PM, Ian Mallett [EMAIL PROTECTED]wrote:

 You'll have to be more specific.





 --
 - pymike
 Stop loling into a false sense of hilarity



  You can try this:
  bContinue = True
 while bContinue:
 ...
 if xxx:
 bContinue=False
 pygame.quit()
 ...
  # dont use sys.exit, let execution find the end of file.
 EOF
  If even that has problems, then out of the loop and before the EOF do
 something as
 import time
 time.wait(1)
  that for give pygame some time to do cleanup.
 -- untested --
  hth
  --
 claxo




Re: [pygame] help

2008-10-30 Thread claudio canepa
On Thu, Oct 30, 2008 at 7:32 PM, Matt Pearson [EMAIL PROTECTED] wrote:

 where do i put bContinue, before my main loop, or do i intergrate it with
 the loop

 On Thu, Oct 30, 2008 at 4:05 PM, claudio canepa [EMAIL PROTECTED]wrote:



  On Thu, Oct 30, 2008 at 6:51 PM, Matt Pearson [EMAIL PROTECTED]wrote:

 srry it does not clear the exception, i meant to say that it only clears
 the
 exception when i put the loop in a function, still closing problem
 remains

  On Thu, Oct 30, 2008 at 3:49 PM, Matt Pearson [EMAIL PROTECTED]wrote:

 i have done that and while it clears IDLE of the exception it still
 has a problem closing the window correctly

  On Thu, Oct 30, 2008 at 2:21 PM, pymike [EMAIL PROTECTED] wrote:

 Call pygame.quit()  right before the exit() function

 hth

 On Thu, Oct 30, 2008 at 1:49 PM, Matt Pearson [EMAIL PROTECTED]wrote:

 srry, just seeing if i have the right address,
 so im using python 2.6 and pygame 1.8

 When i write out a script and save it, I run it, and all is fine
 until i try to close the window, and it freezes and goes to an
 unresponsive program, then IDLE tells me this

 Traceback (most recent call last):
   File C:\Python26\RectTest.py, line 15, in module
 exit()
 SystemExit
  On Thu, Oct 30, 2008 at 1:36 PM, Ian Mallett [EMAIL PROTECTED]wrote:

 You'll have to be more specific.





 --
 - pymike
 Stop loling into a false sense of hilarity



  You can try this:
 bContinue = True
 while bContinue:
 ...
 if xxx:
 bContinue=False
 pygame.quit()
 ...
 # dont use sys.exit, let execution find the end of file.
 EOF
 If even that has problems, then out of the loop and before the EOF do
 something as
 import time
 time.wait(1)
 that for give pygame some time to do cleanup.
 -- untested --
 hth
 --
 claxo



 probably you had solved it, but if not: replace your
while True:
with
bContinue = True
while bContinue:
and replace your
exit()
with
bContinue = False
pygame.quit()
--
claxo


Re: [pygame] help

2008-10-30 Thread pymike
If you do that you might get a display error if your drawing code is after
the input code.

On Thu, Oct 30, 2008 at 6:14 PM, claudio canepa [EMAIL PROTECTED] wrote:



 On Thu, Oct 30, 2008 at 7:32 PM, Matt Pearson [EMAIL PROTECTED]wrote:

 where do i put bContinue, before my main loop, or do i intergrate it with
 the loop

 On Thu, Oct 30, 2008 at 4:05 PM, claudio canepa [EMAIL PROTECTED]wrote:



  On Thu, Oct 30, 2008 at 6:51 PM, Matt Pearson [EMAIL PROTECTED]wrote:

 srry it does not clear the exception, i meant to say that it only clears
 the
 exception when i put the loop in a function, still closing problem
 remains

  On Thu, Oct 30, 2008 at 3:49 PM, Matt Pearson [EMAIL PROTECTED]wrote:

 i have done that and while it clears IDLE of the exception it still
 has a problem closing the window correctly

  On Thu, Oct 30, 2008 at 2:21 PM, pymike [EMAIL PROTECTED] wrote:

 Call pygame.quit()  right before the exit() function

 hth

 On Thu, Oct 30, 2008 at 1:49 PM, Matt Pearson [EMAIL PROTECTED]wrote:

 srry, just seeing if i have the right address,
 so im using python 2.6 and pygame 1.8

 When i write out a script and save it, I run it, and all is fine
 until i try to close the window, and it freezes and goes to an
 unresponsive program, then IDLE tells me this

 Traceback (most recent call last):
   File C:\Python26\RectTest.py, line 15, in module
 exit()
 SystemExit
  On Thu, Oct 30, 2008 at 1:36 PM, Ian Mallett [EMAIL PROTECTED]wrote:

 You'll have to be more specific.





 --
 - pymike
 Stop loling into a false sense of hilarity



  You can try this:
 bContinue = True
 while bContinue:
 ...
 if xxx:
 bContinue=False
 pygame.quit()
 ...
 # dont use sys.exit, let execution find the end of file.
 EOF
 If even that has problems, then out of the loop and before the EOF do
 something as
 import time
 time.wait(1)
 that for give pygame some time to do cleanup.
 -- untested --
 hth
 --
 claxo



 probably you had solved it, but if not: replace your
 while True:
 with
 bContinue = True
 while bContinue:
 and replace your
 exit()
 with
 bContinue = False
 pygame.quit()
 --
 claxo




-- 
- pymike
Stop loling into a false sense of hilarity


Re: [pygame] help

2008-10-30 Thread claudio canepa
On Thu, Oct 30, 2008 at 9:37 PM, pymike [EMAIL PROTECTED] wrote:

 If you do that you might get a display error if your drawing code is after
 the input code.- pymike

You are totally right, pymike.
So...

ok, lets forget about bContinue, lets the  while as in the original code,

while True:

and replace in the original code:

if blah:
exit()

by:

if blah:
pygame.quit()
break

--

claxo


Re: [pygame] help

2008-10-30 Thread Matt Pearson
Well i tried what you said first Claudio, and it closed no problem
but then a second later claimed that it was a nonresponsive program...
and IDLE said nothing
but let me try your next suggestion

On Thu, Oct 30, 2008 at 6:52 PM, claudio canepa [EMAIL PROTECTED] wrote:



  On Thu, Oct 30, 2008 at 9:37 PM, pymike [EMAIL PROTECTED] wrote:

 If you do that you might get a display error if your drawing code is after
 the input code.
  - pymike

  You are totally right, pymike.
  So...

 ok, lets forget about bContinue, lets the  while as in the original code,

 while True:

 and replace in the original code:

 if blah:
 exit()

 by:

 if blah:
 pygame.quit()
 break

 --

 claxo



Re: [pygame] help

2008-10-30 Thread Matt Pearson
okay same thing...closes without a hitch but then tells me that it was
NR program again. i dont get it, is there some module i have to DL?

On Thu, Oct 30, 2008 at 6:58 PM, Matt Pearson [EMAIL PROTECTED] wrote:

 Well i tried what you said first Claudio, and it closed no problem
 but then a second later claimed that it was a nonresponsive program...
 and IDLE said nothing
 but let me try your next suggestion

   On Thu, Oct 30, 2008 at 6:52 PM, claudio canepa [EMAIL PROTECTED]wrote:



  On Thu, Oct 30, 2008 at 9:37 PM, pymike [EMAIL PROTECTED] wrote:

 If you do that you might get a display error if your drawing code is
 after the input code.
  - pymike

  You are totally right, pymike.
  So...

 ok, lets forget about bContinue, lets the  while as in the original code,

 while True:

 and replace in the original code:

 if blah:
 exit()

 by:

 if blah:
 pygame.quit()
 break

 --

 claxo





Re: [pygame] help

2008-10-30 Thread Matt Pearson
Should i uninstall pygame 1.8 and get an earlier version?
Or just reinstall 1.8?

On Thu, Oct 30, 2008 at 7:00 PM, Matt Pearson [EMAIL PROTECTED] wrote:

 okay same thing...closes without a hitch but then tells me that it was
 NR program again. i dont get it, is there some module i have to DL?

   On Thu, Oct 30, 2008 at 6:58 PM, Matt Pearson [EMAIL PROTECTED]wrote:

 Well i tried what you said first Claudio, and it closed no problem
 but then a second later claimed that it was a nonresponsive program...
 and IDLE said nothing
 but let me try your next suggestion

   On Thu, Oct 30, 2008 at 6:52 PM, claudio canepa [EMAIL PROTECTED]wrote:



  On Thu, Oct 30, 2008 at 9:37 PM, pymike [EMAIL PROTECTED] wrote:

 If you do that you might get a display error if your drawing code is
 after the input code.
  - pymike

  You are totally right, pymike.
  So...

 ok, lets forget about bContinue, lets the  while as in the original code,

 while True:

 and replace in the original code:

 if blah:
 exit()

 by:

 if blah:
 pygame.quit()
 break

 --

 claxo






Fixing IDLE with pygame issues. Re: [pygame] help

2008-10-30 Thread René Dudfield
hi,

try running your code from a terminal... you'll find it much nicer.

Then you can try using something like ipython which is very cool.  Much like
an IDE without a text editor, but you'll have to try it to see it's
awesomeness.

IDLE + pygame have issues.  Other IDE's can run pygame stuff fine, however
IDLE requires these weird hacks.  Maybe they can be fixed on the pygame
side... but not sure.  Anyone have any ideas on how we could either supply a
patch to IDLE, or patch pygame to fix it?

cheers,



On Fri, Oct 31, 2008 at 12:16 PM, Matt Pearson [EMAIL PROTECTED]wrote:

  I love python and pygame cause the language itself is so easy, but for
 me
 setting up the IDE is far more complicated than i would of hoped, maybe
 thats where my problem is(forgot to put somthing in a folder, set a path,
 ect)
 I may just stick with C++, yea the language is harder but at least setting
 up
 to code is not as painstaking, then again it mightbe worth the trouble
 idk...

 Anyways thanks guys for helping, i should get more familar with the
 enviroment
 before i waste your time.

 Peace Love and Harmony

 On Thu, Oct 30, 2008 at 7:58 PM, Ian Mallett [EMAIL PROTECTED] wrote:

 You could try upgrading to pygame 1.8.1.

 Has anyone else had this problem with Python 2.6?





Re: [pygame] help

2008-10-30 Thread pymike
Bah! Get geany and you want be bothered with IDLE :-) http://geany.org/geany ftw

On Thu, Oct 30, 2008 at 8:16 PM, Matt Pearson [EMAIL PROTECTED] wrote:

  I love python and pygame cause the language itself is so easy, but for
 me
 setting up the IDE is far more complicated than i would of hoped, maybe
 thats where my problem is(forgot to put somthing in a folder, set a path,
 ect)
 I may just stick with C++, yea the language is harder but at least setting
 up
 to code is not as painstaking, then again it mightbe worth the trouble
 idk...

 Anyways thanks guys for helping, i should get more familar with the
 enviroment
 before i waste your time.

 Peace Love and Harmony

 On Thu, Oct 30, 2008 at 7:58 PM, Ian Mallett [EMAIL PROTECTED] wrote:

 You could try upgrading to pygame 1.8.1.

 Has anyone else had this problem with Python 2.6?





-- 
- pymike
Stop loling into a false sense of hilarity


Re: [pygame] help

2008-10-30 Thread Greg Ewing

Matt Pearson wrote:
 I love python and pygame cause the language itself is so easy, but 
for me

setting up the IDE is far more complicated than i would of hoped


Have you considered not using an IDE?

I do all my Python programming with a fairly basic text
editor, a shell window and a web browser showing the
html python docs. I find it's all I need.

--
Greg


Re: [pygame] help

2008-10-30 Thread Matt Pearson
wow thanks man, it worked! man such a relief, im still trying to figure out
how to lose the win32 console window, but thanks a load you just changed my
mind of python, Cheers

On Thu, Oct 30, 2008 at 9:44 PM, pymike [EMAIL PROTECTED] wrote:

 Bah! Get geany and you want be bothered with IDLE :-) http://geany.org/geany 
 ftw


 On Thu, Oct 30, 2008 at 8:16 PM, Matt Pearson [EMAIL PROTECTED]wrote:

  I love python and pygame cause the language itself is so easy, but
 for me
 setting up the IDE is far more complicated than i would of hoped, maybe
 thats where my problem is(forgot to put somthing in a folder, set a path,
 ect)
 I may just stick with C++, yea the language is harder but at least setting
 up
 to code is not as painstaking, then again it mightbe worth the trouble
 idk...

 Anyways thanks guys for helping, i should get more familar with the
 enviroment
 before i waste your time.

 Peace Love and Harmony

   On Thu, Oct 30, 2008 at 7:58 PM, Ian Mallett [EMAIL PROTECTED]wrote:

 You could try upgrading to pygame 1.8.1.

 Has anyone else had this problem with Python 2.6?





  --
 - pymike
 Stop loling into a false sense of hilarity



  1   2   >