changeset 31144:22305b923761

doc: which Python executable and how to change it (bug #62733) * python.m: Document difference between Unix and Windows. Fix whitespace.
author Colin Macdonald <cbm@m.fsf.org>
date Sat, 09 Jul 2022 22:05:40 -0700
parents b3ca7f891750
children 7c5cb8f8a21e
files scripts/miscellaneous/python.m
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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))