Skip to content

Commit 40f61c2

Browse files
committed
disable Python for Matlab < R2022a
Allow force for experiments, but Python interface doesn't get caught by try-catch < R2022a
1 parent b66044f commit 40f61c2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

+stdlib/python_version.m

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,17 @@
66
% where the environment has changed since pyenv() was set. For example
77
% HPC with "module load python3..."
88

9-
function v = python_version()
9+
function v = python_version(force)
10+
arguments
11+
force (1,1) logical = false
12+
end
1013

1114
v = [];
1215

16+
if ~force && isMATLABReleaseOlderThan('R2022a')
17+
return
18+
end
19+
1320
try
1421
pe = pyenv();
1522
vs = pe.Version;

0 commit comments

Comments
 (0)