This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: find_executable should expand ~
Type: Stage: resolved
Components: Distutils Versions: Python 3.3
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Kyle Huey, dstufft, eric.araujo, eric.smith, r.david.murray
Priority: normal Keywords:

Created on 2015-07-23 06:43 by Kyle Huey, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (3)
msg247176 - (view) Author: Kyle Huey (Kyle Huey) Date: 2015-07-23 06:43
It would be nice if find_executable("~/path/to/my/local/build/of/a/binary") would work.
msg247180 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2015-07-23 10:40
You can use os.path.expanduser(). In general we leave decisions such as expanding user names and environment variables up to the caller, and we don't build them in to each function.

Although I'm not sure why you'd want to pass a full path name to distutils.spawn.find_executable(), if that's the function you're talking about. I'm not even entirely sure it's supposed to work given a full path.
msg247192 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2015-07-23 13:15
Agree with Eric.  Use expanduser if you want the ~ expanded.
History
Date User Action Args
2022-04-11 14:58:19adminsetgithub: 68878
2015-07-23 13:15:23r.david.murraysetstatus: open -> closed

nosy: + r.david.murray
messages: + msg247192

resolution: not a bug
stage: resolved
2015-07-23 10:40:45eric.smithsetnosy: + eric.smith
messages: + msg247180
2015-07-23 06:43:33Kyle Hueycreate