Despite Edward's interest moving on from Sage, here are a couple of tips 
that may be helpful with other projects too.  Firstly one can run Sage 
scripts from within Leo without launching it inside Sage. The method given 
above doesn't provide any communication between Sage and Leo so we might as 
well just run Leo stand-alone.

There is one problem: if you install Leo into a venv instead of into the 
system Python's installation - as you should - then the venv's python will 
not know about sage.  Here's how to make it work. Before running Leo set 
PYTHONPATH to point to the site-packages  directory of your venv. Then 
launch Leo as you normally do - using the system's Python install, not the 
venv's. For my particular VM, here's the command:

export 
PYTHONPATH=/home/tom/venv/leo/lib/python3.12/site-packages:/home/tom/git/leo-editor

In this case I also included m git clone of Leo-Editor so I didn't need to 
cd to its directory first.

The second things that the little sage program in Edward's post created a 
graphics primitive but showed nothing.  The graphic can be saved as a png 
file and viewed with VR3.  In fact, we can mix RsT and Python code together 
and execute and render it with  VR3.  A screen shot is attached.

On Sunday, October 20, 2024 at 7:18:25 PM UTC-4 Edward K. Ream wrote:

> On Sun, Oct 20, 2024 at 3:02 PM Thomas Passin wrote:
>
> > EKR: Getting [SageMath's] plot statement to show the expected plot is 
> my next project.
>
> That project is on hold indefinitely.
>
> > TBP: Maybe: 
> https://ask.sagemath.org/question/37719/how-can-i-display-a-plot-from-a-script/
>
> Thanks for the link.
>
> Edward
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/1172b723-8b34-4ce1-be82-92e2d05d6836n%40googlegroups.com.

Reply via email to