Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在 Python 脚本末尾的 cap 文件中生成 Wireshark/tcpdump 跟踪。例如,我查看了 libcap,但是在执行命令时,脚本停止了。如何在不暂停我的初始 python 脚本的情况下生成 cap 文件?谢谢
您可以在后台启动命令:
import os os.spawnl(os.P_NOWAIT, 'your_command')
或者:
import subprocess process = subprocess.Popen(['your_command', 'arg1', 'arg2'])