[issue34841] Script’s directory not in sys.path with embeddable Windows distribution

2020-02-04 Thread Sam Clegg
Sam Clegg added the comment: Thanks for the info. If we run into any more difficulties I'll look into nuget. I should indeed have read the docs more closely. Apologies. -- ___ Python tracker

[issue34841] Script’s directory not in sys.path with embeddable Windows distribution

2020-02-04 Thread Steve Dower
Steve Dower added the comment: The install page (https://docs.python.org/3/using/windows.html - linked from the download page) covers non-interactive installs, as well as describing the embeddable distro in detail (https://docs.python.org/3/using/windows.html#windows-embeddable). It sounds

[issue34841] Script’s directory not in sys.path with embeddable Windows distribution

2020-02-04 Thread Sam Clegg
Sam Clegg added the comment: In our case we ended up stripping the .pth file and distributing that modified .zip files. I guess the main problem here is that its really not clear that this version of python doesn't work like the others, or needs to be modified before use. It can be very c

[issue34841] Script’s directory not in sys.path with embeddable Windows distribution

2020-02-04 Thread Steve Dower
Steve Dower added the comment: This is intentional. When embedding the Python runtime, you should limit the import directories to those you want to allow - we do not infer *any* from how it is started, due to the security risks. Modifying the ._pth file after you extract the distro and befor

[issue34841] Script’s directory not in sys.path with embeddable Windows distribution

2020-02-04 Thread Sam Clegg
Change by Sam Clegg : -- components: +Installation ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue34841] Script’s directory not in sys.path with embeddable Windows distribution

2020-02-04 Thread Sam Clegg
Sam Clegg added the comment: We just ran into the same issue trying to use this zip as part of the emscripten SDK (https://github.com/emscripten-core/emsdk/pull/349). Seems like a fairly fundamental problem with the windows embeddable zip file. Is there any downside to simply removing the .

[issue34841] Script’s directory not in sys.path with embeddable Windows distribution

2019-02-27 Thread Sebastian Koslowski
Sebastian Koslowski added the comment: I ran into the same problem. Seems like adding an empty sys.path entry through the _pth file is not supported at the moment: https://github.com/python/cpython/blob/53b9e1a1c1d86187ad6fbee492b697ef8be74205/PC/getpathp.c#L589 For now, I have enabled 'impo

[issue34841] Script’s directory not in sys.path with embeddable Windows distribution

2018-09-29 Thread Simon Sapin
Simon Sapin added the comment: Removing python37._pth restores the documented behavior, I don’t know if it has adverse effects. -- ___ Python tracker ___ _

[issue34841] Script’s directory not in sys.path with embeddable Windows distribution

2018-09-29 Thread Simon Sapin
New submission from Simon Sapin : https://docs.python.org/3/library/sys.html#sys.path documents: > As initialized upon program startup, the first item of this list, path[0], is > the directory containing the script that was used to invoke the Python > interpreter. On Windows with an embeddabl