python2
taochifan
computer fan
展开
-
python pymysql mysql乱码记事
#-*-coding:utf-8-*-'''import pymysql.cursors#connect to databaseconnection=pymysql.connect(host='', user='', password='', ...原创 2017-05-19 09:52:41 · 1156 阅读 · 0 评论 -
python编码utf-8 gbk小测试
utf-8:# -*- coding: utf-8 -*- #a= raw_input(u"请输入要查询的人员的姓名input query_name: ")b = '浙江省杭州市'c = u'浙江省杭州市'print len(a)print len(b)print len(c)print [a]print [b]print [c]输出:请输入要查询的人员的...原创 2018-08-23 17:10:35 · 328 阅读 · 0 评论 -
python2中文字符处理,字符串处理
中文字符处理str<---->unicode从左到右是decode ,从右往左是encode<type 'str'> ---><type 'unicode'>decode('utf-8','gbk','gb2312')<type 'unicode'> ---><type 'str'>encode('utf-8','gbk','gb2312')https://blog.csdn.net/qq_27871...原创 2020-10-12 11:45:13 · 299 阅读 · 0 评论 -
2020-10-08pyinstaller打包python脚本到exe文件 python2.7
python2.7安装pyinstaller当前4.0版本只支持python3.5-3.7不支持2.7了前一个版本3.6支持python2.7pip install pyinstller==3.6C:\Users\netmanager\Desktop>pip install pyinstallerDEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade...原创 2020-10-08 14:02:27 · 1425 阅读 · 0 评论 -
2020-10-08发一个Windows下查看计算机基本配置的python程序 python2.7
pip install wmi# -*- coding: cp936 -*-# uncompyle6 version 3.7.4# Python bytecode 2.7 (62211)# Decompiled from: Python 2.7.18 (v2.7.18:8d21aa21f2, Apr 20 2020, 13:19:08) [MSC v.1500 32 bit (Intel)]# Embedded file name: query.py# Compiled at: 1995-.原创 2020-10-08 10:47:10 · 212 阅读 · 0 评论 -
python2 反编译pyinstaller打包的可执行exe文件
先上个链接,基于python3的反编译python打包的exe文件的教程https://blog.csdn.net/weixin_46847476/article/details/105358131故事开始于pyinstxtractor.py反编译query.exe文件后不会直接生成query.py文件,是没有扩展名的query文件,需要根据struct文件修改query文件,具体是往query文件里添加若干个16进制字符串,此例是16个hex。C:\Users\netmanager\De..原创 2020-10-07 21:59:27 · 1064 阅读 · 2 评论