1

我正在尝试通过 python 执行这个简单的 tshark 命令,但我无法成功并且我不明白错误

操作系统:Windows 7 Python 3.3

代码是

from subprocess import Popen


f = open("C:\\folder2\\test.txt","w")
Popen(["tshark" ,"-r","C:\\folder2\\fvido.pcap","-qz", "io,stat,0"],stdout=f)

我得到的错误是

Traceback (most recent call last):
  File "C:/Users/pc/Google Drive/Python/tshark1.py", line 6, in <module>
    Popen(["tshark" ,"-r","C:\\folder2\\fvido.pcap","-qz", "io,stat,0"],stdout=f)
  File "C:\Python33\lib\subprocess.py", line 820, in __init__
    restore_signals, start_new_session)
  File "C:\Python33\lib\subprocess.py", line 1112, in _execute_child
    raise WindowsError(*e.args)
FileNotFoundError: [WinError 2] The system cannot find the file specified
4

0 回答 0