- 2025年06月04日
- 星期三

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