gpt4 book ai didi

python - 如何在 Here Document 之后给出参数?

转载 作者:太空狗 更新时间:2023-10-30 01:59:01 25 4
gpt4 key购买 nike

我想通过“Here Document”按照我的 bash shell 脚本中的一些参数执行 python 脚本,如下所示

python <<'__SCRIPT__'
...
__SCRIPT__
ARG1 ARG2 ...

但不知道如何给出这些论据。我试过将它们放在 python 之后、SCRIPT 之后以及紧跟在 SCRIPT 之后的新行。但是执行的时候都是报错。

那么怎样才是正确的做法呢?

BR,若尘

最佳答案

参数是命令的一部分。

python - arg1 arg2 << ...

关于python - 如何在 Here Document 之后给出参数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19854389/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com