I've written a quick and dirty port to Python, for anyone who'd like to take a look:
https://github.com/bclune/rubber_bullets