
一个使用SimpleHTTPServer和SocketServer的简单的python服务器,如何在重新运行.py文件之
当我在 linux shell中运行我的 python服务器文件simplehttpwebsite.py,我做控制c并再次运行,我得到socket.error:[Errno 98]地址已经在使用. 当我执行ctrl c时,如何确保套接字关闭? simplehttpwebsite.py #!/usr/bin/env pythonimport SimpleHTTPServerimpor