在python中为bash脚本创建弹出终端

2024-06-26 00:30:25 发布

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

因此,下面的一些新手代码起到了作用,但唯一的问题是bash脚本在终端中运行我使用的是run-the-rest-of-python脚本,如果有人能帮助找到一种方法,让脚本在一个全新的终端中运行,而不在完成时关闭,我将不胜感激。 谢谢。你知道吗

    elif request.lower() == "request arpscan":
        print("Would you like to run ""ArpScan""?")
        arpscananswer = input('>>')
        if arpscananswer.lower() == "yes":
            subprocess.Popen("/BadMuffin/scripts/ArpScanAll")
            print("success, moving back to hub")

Tags: oftheto方法run代码脚本bash