This is a short post as I have already wrote this up pretty nicely when I originally did it. This recipe is one I was stolen from inspired by one that James wrote but I made it both in Python and cross-platform.

You can read the original original post here.