mirror of https://github.com/openspug/spug
U 批量执行选择Python时将优先使用python3
parent
9b4011cb2b
commit
09be752bc1
|
@ -38,7 +38,8 @@ class Job:
|
||||||
|
|
||||||
def _handle_command(self, command, interpreter):
|
def _handle_command(self, command, interpreter):
|
||||||
if interpreter == 'python':
|
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
|
return command
|
||||||
|
|
||||||
def send(self, data):
|
def send(self, data):
|
||||||
|
|
Loading…
Reference in New Issue