Message357519
> But then I need two separate workflows based on what is passed in. For py.exe I need to run it and get sys.executable. But for python.exe I *cannot* use sys.executable because that’s the base interepeter, not the venv path I want. And `if Path(arg).stem == "py"` just seems like a bug waiting to happen.
If you use shutil.which() to resolve "python" or "py" against PATH (which doesn't include the application directory), then you'll get the full path to the correct python.exe and will get the expected sys.executable. So it's only one flow that works for both once you add the shutil.which step. |
|
Date |
User |
Action |
Args |
2019-11-26 17:31:37 | steve.dower | set | recipients:
+ steve.dower, paul.moore, eric.smith, tim.golden, zach.ware, eryksun, uranusjr |
2019-11-26 17:31:37 | steve.dower | set | messageid: <1574789497.11.0.0779021545947.issue38905@roundup.psfhosted.org> |
2019-11-26 17:31:37 | steve.dower | link | issue38905 messages |
2019-11-26 17:31:36 | steve.dower | create | |
|