Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #44878
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2013-05-07 02:27 -0700 |
| Message-ID | <69b77965-5ff5-4c6f-a73d-0826b06353f0@googlegroups.com> (permalink) |
| Subject | Why sfml does not play the file inside a function in this python code? |
| From | cheirasacan@gmail.com |
from tkinter import *
import sfml
window = Tk()
window.minsize( 640, 480 )
def sonido():
file = sfml.Music.from_file('poco.ogg')
file.play()
test = Button ( window, text = 'Sound test', command=sonido )
test.place ( x = 10, y = 60)
window.mainloop()
Using Windows 7, Python 3.3, sfml 1.3.0 library, the file it is played if i put it out of the function. ¿ what am i doing wrong ? Thanks.
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Why sfml does not play the file inside a function in this python code? cheirasacan@gmail.com - 2013-05-07 02:27 -0700
Re: Why sfml does not play the file inside a function in this python code? MRAB <python@mrabarnett.plus.com> - 2013-05-07 11:53 +0100
Re: Why sfml does not play the file inside a function in this python code? cheirasacan@gmail.com - 2013-05-07 06:56 -0700
Re: Why sfml does not play the file inside a function in this python code? MRAB <python@mrabarnett.plus.com> - 2013-05-07 15:57 +0100
Re: Why sfml does not play the file inside a function in this python code? cheirasacan@gmail.com - 2013-05-07 13:02 -0700
Re: Why sfml does not play the file inside a function in this python code? Chris Angelico <rosuav@gmail.com> - 2013-05-08 01:06 +1000
dist-packages or site-packages in Python 3.2 ? Vincent Vande Vyvre <vincent.vandevyvre@swing.be> - 2013-05-07 19:03 +0200
csiph-web