title: How can I convert a pcap into CSV using python
body: <p>I need to convert a pcap file that I have on my drive into a csv file using python code ( I know how to do it using wireshark UI ) but I need to do it throught a python code , </p>
  
  <p>I already triend this code  : </p>
  
  <pre><code>import os
  os.system("tshark -r mirai.pcap -T fields -e ip.src -e frame.len -e     ip.proto -E separatorr=, -E occurrence=f &gt; traffic.csv")
  </code></pre>
  
  <p>I get a result file but it's empty one.</p>
  
  <p>Can anyone help me please.</p>