我试图在命令提示符下执行命令后自动按enter键,例如,我运行。。。。在
d:\myunit> codecov instrument -ip
它输出:
Warning: It is recommended when instrumenting code that you use the sub-unit option for 'codecov' to avoid instrumentation being inserted in the source code in your development unit. Press 'enter' to continue with-out using a sub-unit.
如果该命令实际上是从python脚本执行的(使用操作系统('codecov instrument-ip'))。如何使同一个脚本也按enter键以便脚本可以继续而不需要用户输入? 目前,我一直在尝试使用一个子流程,但不确定这是否是最好的解决方法,但还没有让它发挥作用。在
这就是我能用的解决方案。在
相关问题 更多 >
编程相关推荐