leet-code use python3 if available
This commit is contained in:
1
projects/leet-code/.gitignore
vendored
Normal file
1
projects/leet-code/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
main.py
|
@@ -3,4 +3,4 @@
|
|||||||
--main leet_code.Main
|
--main leet_code.Main
|
||||||
-dce full
|
-dce full
|
||||||
--python main.py
|
--python main.py
|
||||||
-cmd python main.py
|
-cmd bash test-python.sh
|
||||||
|
6
projects/leet-code/test-python.sh
Executable file
6
projects/leet-code/test-python.sh
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
# "python" is supposed to mean Python3 everywhere now, but not in practice
|
||||||
|
if [ ! -z "$(which python3)" ]; then
|
||||||
|
python3 main.py
|
||||||
|
else
|
||||||
|
python main.py
|
||||||
|
fi
|
Reference in New Issue
Block a user