Re: [sage-support] Re: Calling Sage on Windows from external scripts

2023-12-03 Thread Dima Pasechnik
We are actually removing Cygwin support in Sage, so yes, going forward it will 
be WSL only.

On 3 December 2023 14:21:13 GMT, Sean Fitzpatrick  
wrote:
>Thanks David.
>
>It sounds like that will require some changes in PreTeXt itself.
>
>I was experimenting because I got a new Windows computer at work, to know
>how well PreTeXt is currently supported on Windows.
>
>I think the answer might be that everything works locally, as long as your
>book doesn't have Sage graphics.
>If it does, PreTeXt needs to be installed inside WSL rather than locally.
>Then one can follow instructions to connect vscode with the WSL.
>
>I had also tried using the older 9.3 Windows installer, but I couldn't get
>that to work either, and if Sage will be WSL only moving forward, it is
>probably not worth the effort to figure it out.
>
>On Sun, Dec 3, 2023, 12:58 a.m. David Ayotte 
>wrote:
>
>> If you have Python script running locally on Windows, you could call the
>> sage script by doing something like:
>>
>> import os
>> os.system('wsl sage your-sage-script.sage')
>>
>> See this page:
>>
>> https://learn.microsoft.com/en-us/windows/wsl/filesystems
>>
>> for more about Windows-Linux interoperability.
>>
>> David A.
>>
>>
>> Le samedi 2 décembre 2023 à 18:30:05 UTC-5, Sean Fitzpatrick a écrit :
>>
>>> I am wondering if anyone has experience installing Sage on Windows via
>>> WSL, and calling Sage as an executable from another program that's
>>> installed locally on Windows.
>>>
>>> My particular use case is processing Sage plot images in a PreTeXt
>>> document.
>>>
>>> I could install everything for PreTeXt via WSL but I already have most
>>> things locally installed: LaTeX, Python, VScode, etc.
>>> Sage is the only missing piece.
>>>
>>> For a PreTeXt book with Sage graphics, there's a Python script that
>>> extracts the Sage code, sends it to the Sage exectuable, and saves the
>>> resulting image.
>>>
>>> I'm not sure how to have a Python script running locally on Windows call
>>> an executable in WSL.
>>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "sage-support" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/sage-support/Nol-n_kYRAw/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> sage-support+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/sage-support/a4cf8723-1376-49a6-babe-3bc910423cb4n%40googlegroups.com
>> 
>> .
>>
>
>-- 
>You received this message because you are subscribed to the Google Groups 
>"sage-support" group.
>To unsubscribe from this group and stop receiving emails from it, send an 
>email to sage-support+unsubscr...@googlegroups.com.
>To view this discussion on the web visit 
>https://groups.google.com/d/msgid/sage-support/CAH%2BNcPaRecpjKXyL7C1s06mV2YyroUbWVJOqtDD0hWtZ_Cgp8Q%40mail.gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/56A75FDF-8021-47F4-B9B7-FADDE8F5CD1B%40gmail.com.


Re: [sage-support] Re: Calling Sage on Windows from external scripts

2023-12-03 Thread Sean Fitzpatrick
Thanks David.

It sounds like that will require some changes in PreTeXt itself.

I was experimenting because I got a new Windows computer at work, to know
how well PreTeXt is currently supported on Windows.

I think the answer might be that everything works locally, as long as your
book doesn't have Sage graphics.
If it does, PreTeXt needs to be installed inside WSL rather than locally.
Then one can follow instructions to connect vscode with the WSL.

I had also tried using the older 9.3 Windows installer, but I couldn't get
that to work either, and if Sage will be WSL only moving forward, it is
probably not worth the effort to figure it out.

On Sun, Dec 3, 2023, 12:58 a.m. David Ayotte 
wrote:

> If you have Python script running locally on Windows, you could call the
> sage script by doing something like:
>
> import os
> os.system('wsl sage your-sage-script.sage')
>
> See this page:
>
> https://learn.microsoft.com/en-us/windows/wsl/filesystems
>
> for more about Windows-Linux interoperability.
>
> David A.
>
>
> Le samedi 2 décembre 2023 à 18:30:05 UTC-5, Sean Fitzpatrick a écrit :
>
>> I am wondering if anyone has experience installing Sage on Windows via
>> WSL, and calling Sage as an executable from another program that's
>> installed locally on Windows.
>>
>> My particular use case is processing Sage plot images in a PreTeXt
>> document.
>>
>> I could install everything for PreTeXt via WSL but I already have most
>> things locally installed: LaTeX, Python, VScode, etc.
>> Sage is the only missing piece.
>>
>> For a PreTeXt book with Sage graphics, there's a Python script that
>> extracts the Sage code, sends it to the Sage exectuable, and saves the
>> resulting image.
>>
>> I'm not sure how to have a Python script running locally on Windows call
>> an executable in WSL.
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "sage-support" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/sage-support/Nol-n_kYRAw/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> sage-support+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/a4cf8723-1376-49a6-babe-3bc910423cb4n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CAH%2BNcPaRecpjKXyL7C1s06mV2YyroUbWVJOqtDD0hWtZ_Cgp8Q%40mail.gmail.com.


[sage-support] Re: Calling Sage on Windows from external scripts

2023-12-02 Thread David Ayotte
If you have Python script running locally on Windows, you could call the 
sage script by doing something like:

import os
os.system('wsl sage your-sage-script.sage')

See this page:

https://learn.microsoft.com/en-us/windows/wsl/filesystems

for more about Windows-Linux interoperability.

David A.


Le samedi 2 décembre 2023 à 18:30:05 UTC-5, Sean Fitzpatrick a écrit :

> I am wondering if anyone has experience installing Sage on Windows via 
> WSL, and calling Sage as an executable from another program that's 
> installed locally on Windows.
>
> My particular use case is processing Sage plot images in a PreTeXt 
> document.
>
> I could install everything for PreTeXt via WSL but I already have most 
> things locally installed: LaTeX, Python, VScode, etc.
> Sage is the only missing piece.
>
> For a PreTeXt book with Sage graphics, there's a Python script that 
> extracts the Sage code, sends it to the Sage exectuable, and saves the 
> resulting image.
>
> I'm not sure how to have a Python script running locally on Windows call 
> an executable in WSL.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/a4cf8723-1376-49a6-babe-3bc910423cb4n%40googlegroups.com.