The MagPi Kickstarter campaign

The MagPi magazine is now running a Kickstarter project with the aim of getting printed copies of all 8 issues in volume 1, plus a special binder to hold them all, into your hands. From the Kickstarter page:

Bring The MagPi magazine, the best and only magazine for the Raspberry Pi enthusiast, from the digital realm into the physical realm.

I’ve posted a fair bit on here about The MagPi, in part because I write articles for the magazine, but also because I genuinely believe it is a superb read with excellent well thought out articles. I’ve learnt lots by reading each issue and have seen the team grow in strength and capability over the months. This means that each issue is a valuable resource to help anyone of any experience level to get more from their Raspberry Pi.

The current issue shows just how detailed the articles are by presenting a foolproof way to catch Father Christmas (oh ok then... “Santa”) later this month. Now in my eyes that alone is worth contributing to the Kickstarter project (anyone remember the Red Dwarf episode Backwards?)

Please do support the Kickstarter project.

The MagPi issue 8 is out

The MagPi issue 8 has been released, featuring my second ever published program when I take over The Python Pit again. This time around I show how to use Python’s subprocess to create desktop widgets. Think: those things what Windows Vista and 7 has and you won’t be far off.

The Python program has an intentional flaw, but I only reveal general details on this to the readership. This is by design as one of the things I always liked about programs in those 1980s computer magazines (you know, the one’s that listed the code and you had to type it yourself back in the days before cover cassettes / disks or discs became the norm) was that you often had to finish the program off, or improve it to get it to work _just_right_.

If you are reading this I’ll let you know a bit more detail to help you out.

As I note at the end of the article, refreshing the Pygame screen for each widget occurs at the same time as each checks for new content. The problem this causes is that if I drag another window on top of either Pygame window it will blank the output until the next check for content, which could be hours away. The fix is quite straightforward and involves adding an if statement that uses datetime to determine when to check for new content, and changing time.sleep(28800) and time.sleep(3600) to both be time.sleep(1). This means that each pygame widget’s screen will refresh every second (change this to 0.1 for faster refresh, every tenth of a second, at the cost of higher CPU usage by Python) BUT a check for new content will still only happen periodically when the new datetime value is suitably different from the old datetime value. You do NOT just want to change to time.sleep(1) on its own as this will cause both URLs to be queried every second for new content which is much too frequent.