Am 22.04.2023 um 03:27 schrieb Greg Ewing via Python-list:
How are you invoking your script? Presumably you have some code
in your embedding application that takes a script path and runs
it. Instead of putting the code to update sys.path into every
script, the embedding application could do it before running
the script.
In principle a good idea, but I don't know how to do that:
The script is currently invoked by a .cmd file, but that may change to a
shortcut (.lnk). This is what the embeddable package documentation calls
"Python Application - simple approach".
To update sys.path on start up I would need to do something like
C:\path\to\python.exe --add-path C:\s-path C:\s-path\script.py
but I couldn't find an option like --add-path.
--
https://mail.python.org/mailman/listinfo/python-list