1
votes

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
So long as you are not calling platform specific processes then yes, its cross platform.Jakob Bowyer
Ignoring the main question for a moment, note that if you are building your own tool you might want to use libpcap (which tcpdump uses) instead of calling tcpdump directly. And then you will find Python bindings as well more abstract code based on it.mmgp

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.