繁体   English   中英

Python 处理打开另一个工具的 cmd 命令

[英]Python process a cmd command which opens another tool

在 python 中发送 cmd 命令时出现问题。 这个命令打开另一个工具,给它一些 arguments。 问题是工具在打开的时候,还打开了一个cmd window,在这里可以看到发送的消息。 如果我关闭此 cmd window,该工具将像子进程一样关闭。 这很奇怪:我只想打开工具,没有打开任何 cmd window。

如果我手动执行此操作,通过创建我双击的.bat 文件,它可以正常工作(在工具打开时,cmd 打开 0.1 秒,没有任何 cmd 文件仍然附加到工具)。

大图:我创建了一个工具,它会询问一些路径,然后您可以单击“启动工具”,这些路径作为 arguments 发送到将打开的工具。

There is no problem with the CMD window since whatever script you're writing is opening the applications which you're passing in arguments but through the CMD window only.

你谈到了一个批处理文件,它也只能通过CMD window工作。 请检查您的代码流程,并注意或了解它在后端的工作原理。 是不是借助了CMD Window?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM