Incomplete sys.path with embeddable python (Windows)!?
Ralf M.
Ralf_M at t-online.de
Sat Apr 22 17:45:11 EDT 2023
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.
More information about the Python-list
mailing list