diff --git a/spug_api/apps/exec/executors.py b/spug_api/apps/exec/executors.py index 7183004..7a0d0b8 100644 --- a/spug_api/apps/exec/executors.py +++ b/spug_api/apps/exec/executors.py @@ -38,7 +38,8 @@ class Job: def _handle_command(self, command, interpreter): if interpreter == 'python': - return f'python << EOF\n# -*- coding: UTF-8 -*-\n{command}\nEOF' + attach = 'INTERPRETER=python\ncommand -v python3 &> /dev/null && INTERPRETER=python3' + return f'{attach}\n$INTERPRETER << EOF\n# -*- coding: UTF-8 -*-\n{command}\nEOF' return command def send(self, data):