by UnquietTinkerer · 8y ago · 0 comments
#! /bin/sh
# This is a bit hacky: we use the -i flag to force the interpreter into
# interactive mode after the initial commands are executed.
# The "proper" way to do this is probably to set up a PYTHONSTARTUP file
# and put the initial commands in there.
exec ipython3 --no-banner --no-confirm-exit -i -c '
from math import *
import random
import sys, os, platform
print("== IPython %s Calculator REPL ==" % platform.python_version())
' File "<ipython-input-1-a0531db54fa8>", line 1
from
^
SyntaxError: invalid syntax
I shall see if it starts working when I upgrade to a distro with a newer IPython.