Python脚本绕过提示

2024-04-20 00:00:53 发布

您现在位置:Python中文网/ 问答频道 /正文

有一个weblogic脚本sh试验它有下面的代码。在

echo "Starting   ...."
java weblogic.WLST helloworld.py
echo "Ending ..."

打印“Starting….”后的输出将提示以下消息

Creating the key file can reduce the security of your system if it is not kept in a secured location after it is created. Do you want to create the key file? y or n

然后我要手动按y或n,我想把它自动化为y。在

这我是例外,不需要用户干预。在

我需要以某种方式自动传递'y',以便脚本继续流动,而不是停止用户输入。在

以下是地狱世界.py脚本

^{pr2}$

你能帮帮我吗?在


Tags: thekey代码用户pyecho脚本is