会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
nevermore_29
Everything will be ok in the end, if it is not ok, it is not in the end!
博客园
首页
新随笔
联系
管理
订阅
2020年9月4日
linux Samba 搭建
摘要: Samba is a free and open-source software package that provides seamless file and print services to SMB/CIFS clients. Samba is freely available, unlike
阅读全文
posted @ 2020-09-04 15:39 nevermore_29
阅读(267)
评论(0)
推荐(0)
2020年6月3日
Python中threading的join和setDaemon的区别[带例子]
摘要: Python中threading的join和setDaemon的区别[带例子] python的进程和线程经常用到,之前一直不明白threading的join和setDaemon的区别和用法,今天特地研究了一下。multiprocessing中也有这两个方法,同样适用,这里以threading的joi
阅读全文
posted @ 2020-06-03 15:44 nevermore_29
阅读(183)
评论(0)
推荐(0)
python socket zmq
摘要: 本篇博客将介绍zmq应答模式,所谓应答模式,就是一问一答,规则有这么几条 1、 必须先提问,后回答 2、 对于一个提问,只能回答一次 3、 在没有收到回答前不能再次提问 上代码,服务端: #coding=utf-8'''Created on 2015-10-10回复请求@author: kwsy20
阅读全文
posted @ 2020-06-03 14:06 nevermore_29
阅读(427)
评论(0)
推荐(0)
2019年11月27日
paramiko远程控制host执行脚本的用法
摘要: import paramiko ssh = paramiko.SSHClient() print ssh.get_host_keys() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh.connect(hostname="1
阅读全文
posted @ 2019-11-27 15:49 nevermore_29
阅读(344)
评论(0)
推荐(0)
2019年11月19日
python urllib2
摘要: import urllib2 req=urllib2.Request('https://xxxx') resp=urllib2.urlopen(req) >>> resp=urllib2.urlopen(req) Traceback (most recent call last): File "<s
阅读全文
posted @ 2019-11-19 16:04 nevermore_29
阅读(209)
评论(0)
推荐(0)
2019年9月6日
python filter lambda 的使用
摘要: lambda 匿名函数的使用 加上filter的混合使用: filter后面的跟的参数是function和string(当然也可以是list)
阅读全文
posted @ 2019-09-06 14:18 nevermore_29
阅读(1773)
评论(0)
推荐(0)
2019年6月18日
/usr/bin/python^M: bad interpreter: No such file or directory
摘要: 利用如下命令查看文件格式 :set ff 或 :set fileformat 可以看到如下信息 fileformat=dos 或 fileformat=unix 利用如下命令修改文件格式 :set ff=unix 或 :set fileformat=unix :wq (存盘退出) 最后再执行文件 #
阅读全文
posted @ 2019-06-18 11:11 nevermore_29
阅读(663)
评论(0)
推荐(0)
2019年6月11日
Linux中使用dd制作文件的.img
摘要: dd if=/dev/zero of=new_img.img bs=1M count=20 //生成20M的文件,bs块的大小,count块的数量 mkfs.ext3 new_img.img //格式化ext3 mount new_img.img /mnt/new //挂载 cp -r linpac
阅读全文
posted @ 2019-06-11 16:10 nevermore_29
阅读(1503)
评论(0)
推荐(0)
2019年6月5日
python正则表达式
摘要: re.findall 在字符串中找到正则表达式所匹配的所有子串,并返回一个列表,如果没有找到匹配的,则返回空列表。 注意: match 和 search 是匹配一次,findall 匹配所有。 re.search 扫描整个字符串并返回第一个成功的匹配 匹配成功re.search方法返回一个匹配的对象
阅读全文
posted @ 2019-06-05 14:04 nevermore_29
阅读(164)
评论(0)
推荐(0)
2019年5月13日
使用@property
摘要: 使用@property 在绑定属性时,如果我们直接把属性暴露出去,虽然写起来很简单,但是,没办法检查参数,导致可以把成绩随便改: s = Student() s.score = 9999 这显然不合逻辑。为了限制score的范围,可以通过一个set_score()方法来设置成绩,再通过一个get_s
阅读全文
posted @ 2019-05-13 10:16 nevermore_29
阅读(106)
评论(0)
推荐(0)
下一页
公告