> We could test if sys.argv[0] ends with .py and insert sys.executable if
> yes, otherwise use as is.
>
This is what that looks like (working code):
# fix idea 2:
if g.sys.argv[0].endswith('.py'):
command = f'{g.sys.executable} {g.sys.argv[0]} "{fn}"'
else:
command = f'{g.sys.argv[0]} "{fn}"'
g.es_print(command)
g.subprocess.Popen(command)
And this is the first approach:
# fix idea 1:
command = f'{g.sys.executable} {g.app.loadDir}/runLeo.py "{fn}"'
g.es_print(command)
g.subprocess.Popen(command)
At the moment I much prefer the simple and direct version.
--
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/7819786e-220f-42fa-87df-3426fa7ebf1a%40googlegroups.com.