python_Learning
welcome00
这个作者很懒,什么都没留下…
展开
-
修改ubuntu12.04默认的Python版本号
ubuntu默认的Python是2.7版本的,键入Python3.6 就可以使用Python3.X版本。下面修改默认的Python版本,1.删除/usr/bin 下的Python链接 sudo rm /usr/bin/python2. 用下面命令建立新的链接sudo ln -s /usr/bin/python3.6 /usr/bin/python转载 2017-06-01 10:49:24 · 938 阅读 · 0 评论 -
python3.5 模拟UDP客户端发送数据报文,报错:TypeError: a bytes-like object is required, not 'str'
#!/usr/bin/env python# -*- coding:utf-8 -*-import sockettarget_host = "127.0.0.1"target_port = 80#建立一个socket对象client = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)#发送一些数据response = cli原创 2017-07-16 16:15:44 · 3123 阅读 · 0 评论 -
【Python2.7 gevent 库安装步骤】
gevent 安装之前要安装libevent 1.下载安装包新版本是libevent-2.1.8-stable。(如果你的系统已经安装了libevent,可以不用安装)官网:http://www.monkey.org/~provos/libevent/ http://libevent.org/ widow执行文件:http://www.lfd.uc转载 2017-08-14 13:44:39 · 8808 阅读 · 0 评论