[scripts] add Python calculator

This commit is contained in:
Dmytro Meleshko 2019-10-29 17:23:23 +02:00
parent 0f082b90a1
commit 8841a89281
2 changed files with 12 additions and 0 deletions

9
scripts/pycalc3 Executable file
View file

@ -0,0 +1,9 @@
#!/bin/sh
for python in bpython python3; do
if python="$(command -v "$python")"; then
break
fi
done
echo "using Python '$python'"
PYTHONSTARTUP="$(dirname "$0")/pycalc_startup.py" "$python" "$@"

View file

@ -0,0 +1,3 @@
from math import *
print("loaded Python calculator")