The following sage.init file launches sage.leo when SageMath starts:
from subprocess import Popen
leo_path = '/home/edreamleo/sage.leo'
proc = Popen([f"leo {leo_path}"],
shell=True, stdin=None,
stdout=None, stderr=None, close_fds=True)
Sage continues to run without blocking. The only glitch is that I must click on the sage console and hit <return> to see a sage prompt.
As reported earlier, scripts such as the following run within Leo:
import sage.all as sage
from sage.all import Integer, plot
y = sage.circle(
(Integer(0),Integer(0)), Integer(1),
rgbcolor=(Integer(1),Integer(1),Integer(0)))
print(y)
The print statement works, but neither of the following statements works:
y.show()
y.plot()
Getting the plot statement to show the expected plot is my next project.
I have hopes: SageMath uses huge IPython libraries that should be accessible to Leo.
Summary
SageMath can launch Leo automatically on startup.
Leonine scripts in that Leo can successfully sage scripts.
IPython libraries promise to solve any imaginable problem.
Edward
P.S. A Milestone: My Linux workflow is roughly as convenient as my Windows workflow.
EKR