Message378927
Paul explained precisely of what I was going through when I reached out to you with this:
> then the "running executable" is "path/to/venv/scripts/python.exe", and so the path containing the running executable is "path/to/venv/scripts", so a search for "python" will locate "path/to/venv/scripts/python.exe", because that's how Windows path search rules work. The problem is that that exe is a redirector, and the script is *actually* being run by the system Python.
However, after reading through your messages and thinking about this for a few days I think it'd be sufficient to point out sys.executable's existence early on in the subprocess docs and then say something like how python is not reliable. Similarly to what Paul said here: https://bugs.python.org/issue42041#msg378727
I used python in my subprocess call because I thought it would always resolve to the the current interpreter. Clearly I don't work a whole lot with Windows...
Eryk - I really appreciate your explanation and I think that level of detail should be documented. I'd read it because I'm interested, but that is probably too much detail for someone who is trying to get something done quickly.
I think both the quick explanation (and pointing out sys.executable's existence) and the detailed why would have it's place in the docs.
Maybe the details could be documented for educational purposes and not as a guarantee of implementation? |
|
Date |
User |
Action |
Args |
2020-10-19 06:06:04 | keller00 | set | recipients:
+ keller00, paul.moore, vinay.sajip, tim.golden, docs@python, zach.ware, eryksun, steve.dower, gaborjbernat |
2020-10-19 06:06:03 | keller00 | set | messageid: <1603087563.96.0.296458085619.issue42041@roundup.psfhosted.org> |
2020-10-19 06:06:03 | keller00 | link | issue42041 messages |
2020-10-19 06:06:03 | keller00 | create | |
|