作者e12518166339 (耐纶)
看板Python
标题[问题] 自动按下Enter
时间Mon Oct 23 19:27:54 2017
因为我的自动化程式在执行某个安装或编译的过程会有一系列的问题
我想要在执行的时候碰到Q&A会自动按下Enter(采用default)
我知道的方法是用 echo -e '\n' | python hello.py
可是我觉得这样的方式很丑
不知道又没有其他的方法
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 180.177.7.3
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Python/M.1508758078.A.80C.html
1F:推 flarehunter: 传个--use-default的参数进去,只要有这参数就用预 10/24 10:30
2F:→ flarehunter: 设值 10/24 10:30
3F:推 johnlinvc: yes | python hello.py 10/24 11:32