Checking if port is in use.
Grant Edwards
grante at visi.com
Sat Mar 19 11:39:56 EST 2005
On 2005-03-19, Alex Polite <m4 at polite.se> wrote:
>
> If I try to bind a socket to a port that's already in use I get this
> error
>
> "error socket.error: (98, 'Address already in use')"
>
> Is there anyway to check in advance if a port i already taken?
Yes. Try to bind to the port. If you get teh "Address already
in use" error, then it's already taken.
--
Grant Edwards grante Yow! Is this BOISE??
at
visi.com
More information about the Python-list
mailing list