会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
njuptlwh
博客园
首页
新随笔
联系
订阅
管理
2022年9月28日
多个python环境,选用指定环境下的 pyinstaller 进行打包文件
摘要: 背景: 电脑上同时安装了python2.7和python3.8,现在想用 python3.8环境下的pyinstaller来进行打包生成exe文件。 常规操作方法:通过cmd进入需要打包文件的目录,执行命令 pyinstaller -F -w xx.py 就能进行打包生成exe文件 尝试方法一(失败
阅读全文
posted @ 2022-09-28 10:12 njuptlwh
阅读(1066)
评论(1)
推荐(1)
2022年2月22日
pytest PytestUnknownMarkWarning
摘要: 问题描述: 执行pytest时,弹出warning信息 “PytestUnknownMarkWarning: Unknown pytest.mark.measconftest - is this a typo? You can register custom marks to avoid this
阅读全文
posted @ 2022-02-22 10:31 njuptlwh
阅读(432)
评论(0)
推荐(1)
2020年11月5日
python 定时器 timer QTimer
摘要: 需求背景: 一秒记录一个数据,数据从仪器读取,经过一系列的操作后记录到csv文件(该过程从发命令到成功写入CSV需要的操作时间不等,从几毫秒到几百毫秒),记录时间一天左右! 第一次实现 使用 time.sleep() 1 import time 2 import datetime 3 4 def h
阅读全文
posted @ 2020-11-05 16:11 njuptlwh
阅读(3303)
评论(0)
推荐(0)
2020年10月25日
Python 2.7.16 pyinstaller3.0 生成exe可执行文件
摘要: 背景: 本人用python2.7+pyqt4 写了一个记录仪器log的带界面的小程序,要拿到客户电脑上用,必须要打包成可执行文件才行! 找方法: 网上搜了一下很简单,pyinstaller -F xxx.py 就能生成梦寐以求得可执行文件了 第一步:打开dos,直接输入命令 "pip install
阅读全文
posted @ 2020-10-25 21:36 njuptlwh
阅读(1276)
评论(0)
推荐(1)
2020年6月9日
python 根据excel单元格内容获取该单元格所在的行号
摘要: python 环境:Python 2.7.16 需要安装:pandas/xlrd (pip2 install pandas/ pip2 install xlrd) import pandas as pd def find_row(num_value,file_name): """ Returns t
阅读全文
posted @ 2020-06-09 08:46 njuptlwh
阅读(5259)
评论(0)
推荐(0)
2020年5月27日
python 实现仪器LAN口通信(FLUKE 8846)
摘要: # _*_ coding:utf-8 _*_ import socket import time HOST = '169.254.1.1' #8846 IP PORT = 3490 #8846 PORT BUF_SIZE = 1024 ADDR = (HOST,PORT) client = sock
阅读全文
posted @ 2020-05-27 13:08 njuptlwh
阅读(1195)
评论(0)
推荐(0)
2020年3月10日
VS2019 MSB8041 MSB8042 Error
摘要: vs2015工程移到vs2019 提示错误1: MSB8041 MFC libraries are required for this project. ...... 提示错误2: MSB8042 MFC libraries with Spectre Mitigations are. ......
阅读全文
posted @ 2020-03-10 10:29 njuptlwh
阅读(5177)
评论(0)
推荐(0)
2018年1月18日
openpyxl exercise
摘要: https://openpyxl.readthedocs.io/en/latest/tutorial.html https://automatetheboringstuff.com/chapter12/ 两个很好的学习网站
阅读全文
posted @ 2018-01-18 11:01 njuptlwh
阅读(247)
评论(0)
推荐(0)
2018年1月16日
Windows下安装 openpyxl
摘要: 本人电脑已安装Python2.7.2.5,最近在学习Python操作Excel,网上总共看到三种方法:① 使用xlrd xlwt (只适用于office 2003);② 使用openpyxl;③ win32com (类似于直接使用VB操作,有时间再仔细了解) 好,回到正题 安装openpyxl 1.
阅读全文
posted @ 2018-01-16 15:33 njuptlwh
阅读(3391)
评论(0)
推荐(0)
2017年12月6日
wxPython 解决底层函数运行时间长导致GUI卡死的问题
摘要: 带界面的Python程序,当底层函数运行时间过长,这时界面就会产生卡死的现象,体验极差。 上面这段代码在执行过程中,界面会卡死60s,只有等 test_run()执行完成后才能恢复正常。 所以应该给底层函数test_run()重新开辟一个线程,这样就能解决界面卡死的现象了 但这里又出现一个问题,子线
阅读全文
posted @ 2017-12-06 16:50 njuptlwh
阅读(3050)
评论(0)
推荐(0)
下一页
公告