Loading

随笔分类 -  Python

摘要:Windows 10 64-bits Python 3.8.10 64-bits PySide2 5.15.2 PyInstaller 4.3 UPX 4.1.0 Problem 1: > "This application failed to start because no Qt platfor 阅读全文
posted @ 2023-08-29 18:53 gamesun 阅读(71) 评论(0) 推荐(0)
摘要:虽然自己已经改用xml作为配置文件首选格式了,但是有时候还是需要解析ini、cfg文件(为了兼容早期版本或者其他作者的软件)。 基本上Python自带的ConfigParser足够应对了,但是美中不足的是,configparser.RawConfigParser.write()保存文件时,会把所有k 阅读全文
posted @ 2019-06-26 15:01 gamesun 阅读(698) 评论(0) 推荐(0)
摘要:更新tensorflow时遇到报错 Found existing installation: enum34 1.0.4Cannot uninstall 'enum34'. It is a distutils installed project and thus we cannot accuratel 阅读全文
posted @ 2018-12-11 16:46 gamesun 阅读(3366) 评论(0) 推荐(0)
摘要:winpcapy Python的winpcapy库可以简单地实现收发Layer2层(数据链路层,以太网)数据。 winpcapy主页:https://github.com/orweis/winpcapy 安装 pip install winpcapy 发送数据 from winpcapy impor 阅读全文
posted @ 2018-11-22 16:40 gamesun 阅读(8770) 评论(0) 推荐(0)
摘要:求解非线性超定方程组,网上搜到的大多是线性方程组的最小二乘解法,对于非线性方程组无济于事。 这里分享一种方法:SciPy库的scipy.optimize.leastsq函数。 运行结果: 缺点:只是普通的最小二乘解法,对于参数过于相近的情况,比如病态雅克比矩阵的求解效果不好。 有知道L-M算法(Le 阅读全文
posted @ 2017-08-04 16:26 gamesun 阅读(7598) 评论(2) 推荐(0)
摘要:在window10 64bit + Python环境下,通过pip install PyOpenGL成功之后,无奈执行到glutInit()时候总是报错。 OpenGL.error.NullFunctionError: Attempt to call an undefined function gl 阅读全文
posted @ 2016-09-03 14:59 gamesun 阅读(5875) 评论(0) 推荐(0)
摘要:一般,QIcon是通过png或ico等图标文件来初始化的,但是如果图标资源已经在内存里了,或者一个zip压缩文件内,可以通过QPixmap作为桥梁,转换为图标。 阅读全文
posted @ 2015-02-17 19:54 gamesun 阅读(733) 评论(0) 推荐(0)
摘要:《Python标准库》的目录,备用 阅读全文
posted @ 2013-07-03 21:11 gamesun 阅读(2958) 评论(0) 推荐(0)
摘要:调用glutInit()错误_base_glutInit( ctypes.byref(count), holder ) TypeError: 'NoneType' object is not callable的解决办法。 阅读全文
posted @ 2013-06-12 20:28 gamesun 阅读(3952) 评论(0) 推荐(1)