From 1b5f8e16db5d38e0fb6ae5228e04104b4482533a Mon Sep 17 00:00:00 2001 From: Konloch Date: Mon, 12 Jul 2021 07:43:14 -0700 Subject: [PATCH] Python3 Check --- .../resources/ExternalResources.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/resources/ExternalResources.java b/src/main/java/the/bytecode/club/bytecodeviewer/resources/ExternalResources.java index dc8b2462..29526371 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/resources/ExternalResources.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/resources/ExternalResources.java @@ -166,7 +166,24 @@ public class ExternalResources */ public String getPython3Command(boolean blockTillSelected) { - //check if 'python' command is bound as python 2.X + //check if 'pypy3' command is bound as python 3.X + //TODO test this and re-enable it + /*testCommand(new String[]{"pypy3", "--version"}, "python 3", ()->{ + Configuration.python3 = "pypy3"; + }); + if(!Configuration.python3.isEmpty()) + return Configuration.python3;*/ + + + //check if 'python3' command is bound as python 3.X + testCommand(new String[]{"python3", "--version"}, "python 3", ()->{ + Configuration.python3 = "python3"; + }); + if(!Configuration.python3.isEmpty()) + return Configuration.python3; + + + //check if 'python' command is bound as python 3.X testCommand(new String[]{"python", "--version"}, "python 3", ()->{ Configuration.python3 = "python"; });