Deskbar Calculator Yet Again

Yet another release of the deskbar calculator plug-in. This release owes a lot to the ideas of Arne Caspari. From the user’s perspective the major addition is that it now supports converting numbers to and from hexadecimal, binary and octal (e.g. 0x123d, 0b10011, 0234, hex(34), bin(42), oct(23) are all recognised).

The internals have been almost completely rewritten. The whitelist system I was using for determining what to feed to the python eval function has been replaced with a restricted globals list for the eval function. I have also been using an as-yet unpublished test-suite to keep myself on the straight-and-narrow.

It still doesn’t handle 1/8 in a sensible manner and I haven’t actually finished the README I keep promising myself. The reason for this slackness is simple: Lego Star Wars II.


Posted

in

by

Tags: