摘要:python的hashlib库中提供的hexdigest返回长度32的字符串。 md5sum是128bit,也就是16字节,如何将python生成字符串的转为16字节呢? 请看下面代码 output: 5eb63bbbe01eeed093cb22bb8f5acdc3 32 [94, 182, 59,
阅读全文
posted @ 2018-03-11 11:47
搜索积分与排名
随笔档案
最新评论
|
03 2018 档案
摘要:python的hashlib库中提供的hexdigest返回长度32的字符串。 md5sum是128bit,也就是16字节,如何将python生成字符串的转为16字节呢? 请看下面代码 output: 5eb63bbbe01eeed093cb22bb8f5acdc3 32 [94, 182, 59,
阅读全文
posted @ 2018-03-11 11:47
摘要:问题 开机启动其他用户的程序或者说非root用户执行开机启动 编写开机启动脚本 编写开机启动脚本apple_tree,放到/etc/init.d,系统启动时会自动执行。 例如,/etc/init.d/apple_tree 启动脚本的内容格式,可参考linux "service" 。 其中的start
阅读全文
posted @ 2018-03-11 10:46
摘要:本文以例子的形势,介绍如何在python中使用正则表达式。 Example1 output: ni 12222 re.match用法 re.match(pattern, string, flags=0) 参数 patten : 正则表达式 string: 要匹配的表达式 flags: 标志位,用于控
阅读全文
posted @ 2018-03-04 10:52
|
|
Powered by:
|