
python
文章平均质量分 56
ts_learner
学无止境
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
编码问题
python默认是ascill,是不能表示中文的,若涉及encode, 首选要decode成 unicode ,1:print "哈哈".decode('utf-8').encode('utf-8')2:a=u'哈哈'print a.encode('utf-8')3:#encoding=utf8import sysreload(sys)sys.setdefault原创 2017-04-26 11:45:33 · 579 阅读 · 0 评论 -
py2exe 打包
from distutils.core import setupimport py2exeoptions = {"py2exe": { "compressed": 1, "optimize": 2, "bundle_files": 1 # 所有文件打包成一个exe文件原创 2017-04-26 11:47:41 · 389 阅读 · 0 评论 -
FTP上传下载
# coding:utf-8from ctypes import *import osimport sysimport ftplibclass myFtp: ftp = ftplib.FTP() bIsDir = False path = "" def __init__(self, host, port='21')原创 2017-04-26 11:52:24 · 360 阅读 · 0 评论