Skip to content

Tag: python

Python Sound (“Bell”)

I’d like to have a python program alert me when it has completed its task by making a beep noise. Currently, I use import os and then use a command line speech program to say “Process complete”. I much rather it be a simple “bell.” I know that there’s a function that can be used in Cocoa apps, NSBeep, but

Python, Unicode, and the Windows console

When I try to print a Unicode string in a Windows console, I get an error . UnicodeEncodeError: ‘charmap’ codec can’t encode character …. I assume this is because the Windows console does not accept Unicode-only characters. What’s the best way around this? Is there any way I can make Python automatically print a ? instead of failing in this