随笔 - 139  文章 - 0 评论 - 0 阅读 - 33724
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

04 2021 档案
sh模块
摘要:sh模块可以实现在linux服务器上运行命令,不支持windows系统 安装 pip install sh 例子1 >>> import sh >>> sh.echo("hi") hi 例子2 import sh sh.ssh("root@10.1.1.1 pwd") 阅读全文
posted @ 2021-04-18 06:08 longfei2021 阅读(67) 评论(0) 推荐(0) 编辑
IP地址处理模块(IPy)
摘要:IPy这个强大的Python第三方包主要提供了包括网段、网络掩码、广播地址、子网数、IP类型的处理等等功能。 1、安装 sudo pip3 install IPy 详细帮助可以使用help(IPy) 2、判断IP版本 >>> import IPy >>> IPy.IP("127.0.0.1").ve 阅读全文
posted @ 2021-04-17 08:24 longfei2021 阅读(1305) 评论(0) 推荐(0) 编辑
yaml模块
摘要:一、yaml介绍 yaml是一个专门用来写配置文件的语言。yaml的可读性好。yaml和脚本语言的交互性好。目前现有的语言实现广泛:Ruby,Java,Perl,Python,PHP,OCaml,JavaScript。 python还有一个内置configparse模块也可以用于编写配置文件 如果需 阅读全文
posted @ 2021-04-16 00:16 longfei2021 阅读(178) 评论(0) 推荐(0) 编辑
汉字转拼音-pypinyin模块
摘要:最近遇到一个问题,需要将一批中文用户名转换成拼音,网上查了一下,有两个模块可以使用,pypinyin和xpinyin模块,用起来也很方便。 一、pypinyin模块 1、安装 pip3 install pypinyin 2、转换 from pypinyin import pinyin print(p 阅读全文
posted @ 2021-04-15 01:44 longfei2021 阅读(363) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示