xxxxxxxxxx
#We can set the following to overcome the "Address already in use" that we hit often while building our programs:
#This modifies the socket to allow us to reuse the address.
>>>server_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
xxxxxxxxxx
$ ps -fA | grep python
501 81211 12368 0 10:11PM ttys000 0:03.12
python -m SimpleHTTPServer
$ kill 81211
xxxxxxxxxx
You already have a process bound to the port you are trying to run
$ ps -fA | grep python
501 81651 12648 0 9:53PM ttys000 0:00.16 python -m SimpleHTTPServer
figure out the port and then use this command
$ kill 81651
xxxxxxxxxx
$ ps -fA | grep app_name_search #exemple python
501 81211 12368 0 10:11PM ttys000 0:03.12
$ kill -9 81211