Let's continue this investigation on the GitHub issue thread, shall we?

On Wednesday, November 20, 2024 at 1:24:34 PM UTC-5 Thomas Passin wrote:

> On Wednesday, November 20, 2024 at 12:18:26 PM UTC-5 Edward K. Ream wrote:
>
>
> *Summary*
>
> *python -m leo.core.runLeo* works as expected from all locations.
>
> *restart-leo* works as expected at all times.
>
> Edward
>
> I agree that py -m leo.core.runLeo works as expected in all the cases.  My 
> tests all show the same.  What *doesn't *work as expected is running py 
> leo\core\runLeo.py when the working directory is leo-editor. And that's 
> the command that *restart-leo* issues, not py -m.  In addition, on my 
> Windows system where "python.exe" runs Python 3.9.9, the latter seems to 
> get launched as well, not the original sys.executable. I'm not completely 
> sure when this happens but happen it does.
>
> Remember, I got the same differences between running runLeo.py with py -m 
> leo.core.runLeo vs py leo\core\runLeo.py on both my Windows computer and my 
> Linux VM.  So it's not some quirk of my Windows installation that's in play 
> here. (yes, having python.exe and the .py file association linked to Python 
> 3.9.9 is a quirk of my machine but it's not the main issue).
>
> [Later] I removed Leo from my Python 3.9.9 site-packages directory, and 
> after this the command does run the intended version of Leo, but still with 
> the wrong executable:
>
> C:\Tom\git\leo-editor>py leo\core\runleo.py 
>  %USERPROFILE%\.leo\workbook.leo
> Leo 6.8.3-devel, devel branch, build 99593cba0c
> 2024-11-19 16:37:27 -0600
> Python 3.9.9, PyQt version 6.6.2
>
> After more experimenting, I find that the right version of Python gets run 
> if I specify it explicitly (e.g., py -3.12) but if I use just "py", runLeo 
> launches "python.exe". So there is some weird interaction between runLeo 
> and the py launcher, since all other programs I run with a bare "py" run 
> the latest installed version.
>
> [Later] sys.argv for py -m ...:
>
> C:\Tom\git\leo-editor>py *-m leo.core.runLeo* 
> %USERPROFILE%\.leo\workbook.leo
> sys.argv=[*'C:\\Tom\\git\\leo-editor\\leo\\core\\runLeo.py'*, 
> 'C:\\Users\\tom\\.leo\\workbook.leo']
>
> sys.argv for py ...:
>
> C:\Tom\git\leo-editor>py *leo\core\runleo.py* 
>  %USERPROFILE%\.leo\workbook.leo
> sys.argv=[*'leo\\core\\runleo.py'*, 'C:\\Users\\tom\\.leo\\workbook.leo']
>
>
>
>

-- 
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 visit 
https://groups.google.com/d/msgid/leo-editor/af061b5b-d26e-4aae-ac20-2f0661181845n%40googlegroups.com.

Reply via email to