Ask coding questions

← Back to all posts
Play sound in a repl with Python
RojerGS (4)

Hello everyone,

In light of the new challenge I was going to create something with Python (and pygame) and it would involve playing sounds, but turns out I cannot use the pygame.mixer module. Is it because I am a n00b?
Either way, is there any (relatively simple) way of playing audio in a Python repl?

Thanks!

Answered by 21natzil (748) [earned 5 cycles]
View Answer
Commentshotnewtop
21natzil (748)

Sorry, but repl.it does not support sound at the moment. Sorry for the inconvenience. This feature is planned and will be added in time.

RojerGS (4)

@21natzil Ok, then there is something I am missing; this music box has sound when I play it! But you said that repl.it does not support sound, so what is the distinction here?

21natzil (748)

@RojerGS When creating a website on repl.it, you're only restricted by your browser. When working with Python / Pygame repls, sound is not supported, sorry for the confusion.