You can use the codecs module. Something like: import codecs
@defmonitor
def anowplaying(self):
try:
np = codecs.open('/tmp/shell-fm', 'r', 'utf-8').read()
except:
np = ''
return wmii.cache['normcolors'], np
Though im not so sure having a blanket except is so useful.
Also, this code is just an example, I havent actually typed it into an
interpreter.
