# HG changeset patch # User Colin Macdonald # Date 1657429540 25200 # Node ID 22305b923761a8e9e04ce8ee49e131264a4faadd # Parent b3ca7f891750085dae7ea6deabad0505c1f5e914 doc: which Python executable and how to change it (bug #62733) * python.m: Document difference between Unix and Windows. Fix whitespace. diff -r b3ca7f891750 -r 22305b923761 scripts/miscellaneous/python.m --- a/scripts/miscellaneous/python.m Sun Jul 10 18:26:24 2022 -0700 +++ b/scripts/miscellaneous/python.m Sat Jul 09 22:05:40 2022 -0700 @@ -33,6 +33,12 @@ ## Return output in @var{output} and optional status in @var{status}. If ## @var{scriptfile} is not an absolute filename it is searched for in the ## current directory and then in the Octave loadpath. +## +## Programming Note: On UNIX systems, the script will be executed by +## @command{python3} and on Windows by @command{python}. You can override +## these defaults by setting the @env{PYTHON} environment variable, for example +## from within Octave using @code{setenv PYTHON /usr/local/bin/python3}. +## ## @seealso{system, perl} ## @end deftypefn @@ -61,7 +67,7 @@ endfunction -function pyexec = get_python_executable () +function pyexec = get_python_executable () pyexec = getenv ("PYTHON"); if (isempty (pyexec))