- 2025年05月12日
- 星期一
当我在 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