python
文章平均质量分 93
桃李醉东风
真正的大师都有一颗学徒的心
展开
-
SecureCRT脚本-python
SecureCRT脚本-python1.这里写两个小脚本一、SecureCrt脚本(一)顶级对象之Crt1、引言2、关于脚本表头3、顶级对象'crt'的子属性和方法3.1、属性3.1.1、Dialog3.1.2、Screen3.1.3、ScriptFullName3.1.4、Session3.1.5、Version3.1.6、Window3.2、方法3.2.1、GetActiveTab()3.2.2、GetScriptTab()3.2.3、GetTabCount()3.2.4、GetTab(Index)3.转载 2021-06-04 14:36:56 · 5066 阅读 · 2 评论 -
python将代码打包成exe程序并添加图标的方法
pyinstaller -F -w -i G:\automation\tpian.ico G:\automation\test.py-i 给应用程序添加图标-F 指定打包后只生成一个exe格式的文件-D –onedir 创建一个目录,包含exe文件,但会依赖很多文件(默认选项)-c –console, –nowindowed 使用控制台,无界面(默认)-w –windowed, –noconsole 使用窗口,无控制台-p 添加搜索路径...原创 2020-09-02 21:28:15 · 2989 阅读 · 3 评论 -
pip安装模块报错socket.timeout: The read operation timed out
原因:超时报错解决设定超时时间,并且使用清华源pip--default-timeout=100 install -i https://pypi.tuna.tsinghua.edu.cn/simple some-packages原创 2019-08-06 15:09:52 · 2964 阅读 · 0 评论 -
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。
原因:权限不够解决方案:管理员安装。你有可能在用conda安装,现在你需要用cmd窗口,打开cmd可以使用windows+r快捷键,然后输入cmd。使用pip安装,并且尽量运行C:\windows\system32路径下的cmd.exe(你可以查看窗口标题是否是这个路径)Goodluck!!!...原创 2019-08-06 15:25:00 · 1892 阅读 · 0 评论 -
pip常用指令个人总结
1.使用清华源pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package2更新pippython -m pip install --upgrade pip3.查看某个包是否安装pip show --files some-packages4.更新包pip install --upgrad...原创 2019-08-06 20:48:15 · 270 阅读 · 0 评论 -
Python3 编码总结
1.str and bytesPython 3最重要的新特性大概要算是对文本和二进制数据作了更为清晰的区分。文本总是Unicode,由str类型表示,二进制数据则由bytes类型表示。bytes=str.encode('utf-8')str=bytes.decode('utf-8')...原创 2019-08-17 17:48:19 · 80 阅读 · 0 评论 -
python2与python3的区别
一、核心类差异1. Python3 对 Unicode 字符的原生支持。Python2 中使用 ASCII 码作为默认编码方式导致 string 有两种类型 str 和 unicode,Python3 只支持 unicode 的 string。python2 默认bytes 对象在Python2中叫做 str ,Python3中字符串与字节之间相互转换a = b"Hello, world...原创 2019-09-27 21:39:12 · 95 阅读 · 0 评论 -
Python开发面试必备
1在CPython中,列表被实现为长度可变的数组。2.在Python2中,dict的底层是依靠哈希表(Hash Table)进行实现的,使用开放地址法解决冲突.3手撕iou代码def compute_iou(rec1, rec2): # computing area of each rectangles S_rec1 = (rec1[2] - rec1[0]) * (...原创 2019-10-10 15:30:19 · 132 阅读 · 0 评论