check for unused ports and then grab one

Erik Heneryd erik at
Mon Sep 13 22:45:38 CEST 2004

Brad Tilley wrote:
> Instead of me arbitrarily assigning a high port number to a variable, is 
> it possible to check for ports that are unused and then randomly assign 
> one of them to a variable?

No.  Trial and error until you find one.


More information about the Python-list mailing list