r/PyScript • • Oct 07 '22

Question about pyscript

Could I please ask of there is any way for pyscript to cause the html page to play a sound when an if statement is true?

I've tried googling and wasn't able to find an answer to this.

Play sound nor pydub works.

3 Upvotes

5 comments sorted by

View all comments

Show parent comment

1

u/TheSwami Feb 25 '23

Traveling today, so I can’t try it out live. Do you get any errors onscreen or in the developer console?

Should just be defer not defer=“”, that’d be worth changing.

Also, you may want to use the most recent version of PyScript, unless you have a specific reason to use the alpha. `<script defer src="https://pyscript.net/releases/2022.12.1/pyscript.js"></script>