51工具盒子

依楼听风雨
笑看云卷云舒,淡观潮起潮落

Python笔记

Python 动态获取当前运行函数名称

Python 动态获取当前运行函数名称

厉飞雨 阅读(239) 评论(0) 赞(11)

> 本文记录Python动态获取函数名称的方法。 ### 方法1 {#方法1} > 使用 `sys` 库 ### 方法2 {#方法2} > 使用 `inspect` 库 ### 参考资料 {#参考资料} * <https://www.cnblogs.com/yoyoketang/p/9231320.html> <br />...

升级Python后No module named yum处理

升级Python后No module named yum处理

厉飞雨 阅读(341) 评论(0) 赞(17)

<h4>概述</h4> <p>因项目需求对Python版本进行升级,但升级完成后yum不可用。</p> <pre><code>[root@localhost ~]# yum list There was a problem importing one of the Python modules requir...

升级python后yum缺失_sqlitecache.so依赖

升级python后yum缺失_sqlitecache.so依赖

厉飞雨 阅读(336) 评论(0) 赞(17)

<h4>概述</h4> <p>由于前公司运维升级了python版本,导致模块缺失无法使用yum命令。</p> <pre><code>There was a problem importing one of the Python modules required to run yum. The error l...

指定python的pip源

指定python的pip源

厉飞雨 阅读(342) 评论(0) 赞(21)

因为国内网络环境,在访问境外网站时可能会出现链接重置、访问速度慢或超时等问题。 #### 解决办法 ##### 临时指定 在命令后加上-i参数,即可指定pip源。 pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple ##### 永久修改 修改全局配置文件中的index-url项修改为指定...

Python对Excel进行数据对比

Python对Excel进行数据对比

厉飞雨 阅读(419) 评论(0) 赞(19)

<p>接公司任务,通过Python对Excel文件内容进行比对,判断是否有新内容增加</p> <p>以下为Python脚本内容:</p> <pre><code class="language-lang-bash"># coding: utf-8 #----引用模块----# import...