我得到错误 “IndentationError:预期的缩进块”蟒IndentationError “预期的缩进块”
线3 答案= subprocess.check_output(['/家/目录/最终/ 3.sh “])
我的代码是:
import subprocess
while True:
answer = subprocess.check_output(['/home/dir/final/3.sh'])
final = int(answer) // int('1048576')
print final
3.sh结果前 “493281734”
一个关于Python的许多伟大的事情是,它的错误和故障处理是太棒了。这意味着错误意味着他们所说的话,并不意味着他们不说的话。以下是获取错误时用于搜索的很好的资源:https://docs.python.org/3.5/library/exceptions.html – Doug