U 批量执行选择Python时将优先使用python3

pull/442/head
vapao 2021-12-27 16:07:07 +08:00
parent 9b4011cb2b
commit 09be752bc1
1 changed files with 2 additions and 1 deletions

View File

@ -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):