Re: [pygame] Strangest thing..

2009-10-25 Thread Olof Bjarnason
2009/10/25 Christoph Gohlke cgoh...@uci.edu:
 I can reproduce this behavior on Windows 7, Python 2.6 64-bit, pygame
 1.9.2.svn. Try comment out pygame.init().


Worked.

2009/10/25 Brian Fisher br...@hamsterrepublic.com:
 Your script is not creating a window - various things may not work right
 without a window on windows.

Tried that too, and it worked too.

Thanks to both of you! This solved the py2exe dll issue too, so you
just made my day :)

Cya


[pygame] Strangest thing..

2009-10-24 Thread Olof Bjarnason
Hi pygame-users!

I'm new to the list, but not to Python/PyGame.

Tonight I tried playing some music, and noticed that my program only
would play sound if I doulble-clicked the .py file in an explorer
window, not if I ran the script from a command prompt. I'm on Vista,
Python 2.6.1 and Pygame downloaded today, the python 2.6-series.

I stripped down the script to a bare minimun to debug it, and the
behaviour still there in this tiny script which only uses the
enter.wav sound, built into windows.

### START tmp.py
import pygame
import os
import sys

pygame.init()
pygame.mixer.init()

print(pygame.mixer.get_init())
print(sys.version)
print(os.getcwd())

pygame.mixer.music.load(enter.wav)
pygame.mixer.music.play()

while True: pass
### END

I'm kind of lost as to what to do now to try to solve the problem, I'd
really like to know what I'm doing wrong, since I think this program
might be related to a show-stopping issue for me (DLL problems after
doing a py2exe build).

If any one would try and see if the error is still there on their
machines, I would be grateful. The enter.wav file should be located
beside the tmp.py script, and could be found using ordinary F3 search
on Windows.

Cya,

/Olof


Re: [pygame] Strangest thing..

2009-10-24 Thread Brian Fisher
Your script is not creating a window - various things may not work right
without a window on windows.

On Sat, Oct 24, 2009 at 4:00 PM, Olof Bjarnason olof.bjarna...@gmail.comwrote:

 Hi pygame-users!

 I'm new to the list, but not to Python/PyGame.

 Tonight I tried playing some music, and noticed that my program only
 would play sound if I doulble-clicked the .py file in an explorer
 window, not if I ran the script from a command prompt. I'm on Vista,
 Python 2.6.1 and Pygame downloaded today, the python 2.6-series.

 I stripped down the script to a bare minimun to debug it, and the
 behaviour still there in this tiny script which only uses the
 enter.wav sound, built into windows.

 ### START tmp.py
 import pygame
 import os
 import sys

 pygame.init()
 pygame.mixer.init()

 print(pygame.mixer.get_init())
 print(sys.version)
 print(os.getcwd())

 pygame.mixer.music.load(enter.wav)
 pygame.mixer.music.play()

 while True: pass
 ### END

 I'm kind of lost as to what to do now to try to solve the problem, I'd
 really like to know what I'm doing wrong, since I think this program
 might be related to a show-stopping issue for me (DLL problems after
 doing a py2exe build).

 If any one would try and see if the error is still there on their
 machines, I would be grateful. The enter.wav file should be located
 beside the tmp.py script, and could be found using ordinary F3 search
 on Windows.

 Cya,

 /Olof



Re: [pygame] Strangest thing..

2009-10-24 Thread Christoph Gohlke
I can reproduce this behavior on Windows 7, Python 2.6 64-bit, pygame 
1.9.2.svn. Try comment out pygame.init().


Christoph

On 10/24/2009 4:00 PM, Olof Bjarnason wrote:

Hi pygame-users!

I'm new to the list, but not to Python/PyGame.

Tonight I tried playing some music, and noticed that my program only
would play sound if I doulble-clicked the .py file in an explorer
window, not if I ran the script from a command prompt. I'm on Vista,
Python 2.6.1 and Pygame downloaded today, the python 2.6-series.

I stripped down the script to a bare minimun to debug it, and the
behaviour still there in this tiny script which only uses the
enter.wav sound, built into windows.

### START tmp.py
import pygame
import os
import sys

pygame.init()
pygame.mixer.init()

print(pygame.mixer.get_init())
print(sys.version)
print(os.getcwd())

pygame.mixer.music.load(enter.wav)
pygame.mixer.music.play()

while True: pass
### END

I'm kind of lost as to what to do now to try to solve the problem, I'd
really like to know what I'm doing wrong, since I think this program
might be related to a show-stopping issue for me (DLL problems after
doing a py2exe build).

If any one would try and see if the error is still there on their
machines, I would be grateful. The enter.wav file should be located
beside the tmp.py script, and could be found using ordinary F3 search
on Windows.

Cya,

/Olof




Re: [pygame] Strangest thing..

2009-10-24 Thread Kris Schnee

Brian Fisher wrote:
Your script is not creating a window - various things may not work right 
without a window on windows.


If that's the reason, maybe it has to do with SDL itself not being 
properly initialized?