[python-win32] how to obtain list of connected IP/port pairs on user's computer?

Patrick Li patrick at raptr.com
Mon Sep 8 08:28:15 CEST 2008


Hi,

I'm interested in writing a function that returns me the list of IP/port
that the user's machine is connected to.  The most naive way is to run
netstat -na on the user's computer and just parse the stdout.  Are there
libraries I can call to achieve this as opposed to running an external
command?

Thanks,
Patrick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20080907/e73ff4b1/attachment.htm>


More information about the python-win32 mailing list