I still use the python repl in a terminal for my desktop calculator. Its a good choice since usually im already in the terminal anyways.
export PYTHONSTARTUP=/home/savant_penguin/.python/startup.py
and those things will be automatically loaded for you. (Edit: add that line to your .bashrc if you want to use it all or most of the time!)If you don't want them always loaded, but rather just for a "calculator mode," you can do something like
alias pycalc='PYTHONSTARTUP=/home/savant_penguin/.python/ipython startup_calc_mode.py'
If you use ipython, then you can take advantage of autocomplete and not have to type as much, too.Together with some from fractions import Fraction as F would be even better
Thanks
Discussed here a couple of years ago: https://news.ycombinator.com/item?id=23414872