Map port to process

py codecraig at gmail.com
Thu Jan 5 09:39:18 EST 2006


Is there a way in python to figure out which process is running on
which port?  I know in Windows XP you can run "netstat -o" and see the
process ID for each open port....but I am looking for something not
tied to windows particularly, hopefully something in python.

if not, any known way, such as netstat shown above, for other versions
of windows (such as 98, 2000) and even linux?

thanks




More information about the Python-list mailing list