python
python
花开成景花落为诗
But are we all lost stars.Trying to light up the dark.
展开
-
(python)使用tcp服务器端时,出现错误AttributeError: ‘tuple‘ object has no attribute ‘recv‘
一、问题描述(python)使用tcp服务器端时,出现错误AttributeError: ‘tuple’ object has no attribute ‘recv’运行代码:from socket import *# 创建套接字tcp_server_socket=socket(AF_INET,SOCK_STREAM)# 绑定本地信息local_addr=('',7778)tcp_server_socket.bind(local_addr)# 使用socket创建的套接字默认属性是主动,原创 2020-07-12 10:57:36 · 3424 阅读 · 0 评论 -
RuntimeError: An attempt has been made to start a new process before the current process has finised
一、问题描述:在运行下面代码时出现RuntimeError: An attempt has been made to start a new process before the current process has finished its bootstrapping phase.# TODO 进程池的使用from multiprocessing import Poolimport os, time, randomdef worker(msg): t_start = time.t原创 2020-07-12 10:52:06 · 1202 阅读 · 0 评论 -
Sublime安装SublimeREPL插件后,运行带有input的python文件出现Python was not found but can be installed from the Micro
解决步骤:1、检查是否在系统变量path中配置了python的路径2、在确认已经配置了python环境变量后,检查用户的path环境变量中是否有%USERPROFILE%\AppData\Local\Microsoft\WindowsApps如果有,点击编辑然后清空这段字符,保存后要重启电脑。原因:%USERPROFILE%\AppData\Local\Microsoft\WindowsApps会造成用户在使用python时,会优先连到windows应用商店去下载python,而不是使用电脑本地安原创 2020-07-12 10:43:11 · 995 阅读 · 0 评论