Deskbar Calculator Again

There is a new version with some minor tweaks. Firstly you can now use “scientific notation” numbers like 1e6, secondly it doesn’t crash if you select the result from the list. Instead it copies the result to the clipboard (spot the undiscoverable UI).

Everyone who’s been having trouble installing it needs to change the name from calculator.1.1.py to calculator.py. Apparently the extra dots confuse python, I haven’t looked into it properly yet.

I’d also like to point out the Andrew Kerr has a similar deskbar handler on the tutorial page for how to write a deskbar handler. It is to the credit of the deskbar authors that I didn’t have the slightest need to look for a tutorial while writing the handler, the examples in the source where good enough. Notably, Andrew chose a different method to parse the equations and so the capabilities of each version are different (e.g. his can handle some functions like abs(), while mine can do bitwise operations) despite almost all the rest of the code coming out rather similarly. The similarity isn’t helped by me stealing his clipboard code for my 1.1 release. Thanks Andrew.


Posted

in

by

Tags: