diff --git a/docs/changelog/150.doc.rst b/docs/changelog/150.doc.rst new file mode 100644 index 0000000..9801000 --- /dev/null +++ b/docs/changelog/150.doc.rst @@ -0,0 +1 @@ +Clarify the executable paths accepted by ``try_first_with`` in the standalone usage example. diff --git a/docs/how-to/standalone-usage.rst b/docs/how-to/standalone-usage.rst index 0e2e996..66a311b 100644 --- a/docs/how-to/standalone-usage.rst +++ b/docs/how-to/standalone-usage.rst @@ -1,10 +1,10 @@ How-to guides ============= -Search specific directories first ------------------------------------ +Try specific executables first +------------------------------ -If you know a likely location for the interpreter, pass it via ``try_first_with`` to check there +If you know the path to an interpreter executable, pass it via ``try_first_with`` to check it before the normal search. This is useful when you have a custom Python install outside the standard locations. @@ -12,7 +12,7 @@ standard locations. from python_discovery import get_interpreter - info = get_interpreter("python3.12", try_first_with=["/opt/python/bin"]) + info = get_interpreter("python3.12", try_first_with=["/opt/python/bin/python3.12"]) if info is not None: print(info.executable)