Re: [dev] [wmii] Python monitor function failure

2010-06-23 Thread m g
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.

Re: [dev] [surf] User-Agent string.

2010-05-18 Thread m g
On Tue, May 18, 2010 at 4:58 PM, Marvin Vek wrote: > On Tue, May 18, 2010 at 10:35:43PM +0200, Szabolcs Nagy wrote: >> i think unnecessary headers are bad >> >> the user agent string is unnecessary > > According to the RFC, it's required. And some sites will redirect you to a page saying "Firefox

Re: [dev] [sw] Suckless web-framework

2010-04-06 Thread m g
In reference to http://nibble.develsec.org/hg/sw/file/80e2f5765b48/sw.cgi ... Is there a reason on line 20 relies on javascript as opposed to something such as the tag? echo "window.location=\"${PREFIX}${BIN}\";" vs echo ""

Re: [dev] Get a life (was: switch your MUA (was: Full quotes below))

2009-12-16 Thread m g
what On Wed, Dec 16, 2009 at 10:48 AM, hiro <23h...@googlemail.com> wrote: > Seriously, you shouldn't switch your MUA more often than your girlfriends. > > On Wed, Dec 16, 2009 at 3:11 PM, markus schnalke wrote: >> [2009-12-16 13:01] Antoni Grzymala >>> markus schnalke dixit (2009-12-16, 12:29):