On 06/23/2010 02:58 PM, m g wrote:
> 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
Th
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.
Hi,
I have this status bar function in my wmiirc.py:
@defmonitor
def anowplaying(self):
try:
np=open('/tmp/shell-fm').read()
except:
np=' '
return wmii.cache['normcolors'], np
Where /tmp/shell-fm is a now-playing file generated by shell-fm. Until
recently, this just w