I am writing a Network Monitoring application using PySide and Qt. I want to make it cross platform. I am using tcpdump and nmap for a lot of the monitoring portion. There is a nmap python module, but there is no tcpdump python module(that I know of), which means I would have to use subprocess to run tcpdump. So my question is, if I use subprocess, will it work on all platforms (windows, linux, mac) or is it specific to a certain platform?
1 Answers
5
votes
The subprocess module is cross-platform. It works on POSIX (incl. Mac OS X) and Windows platforms.
There are some caveats and differences that apply only to Windows, all documented in the module documentation.
libpcap(whichtcpdumpuses) instead of callingtcpdumpdirectly. And then you will find Python bindings as well more abstract code based on it. - mmgp