
python
ying_593254979
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
造成socket.error: [Errno 99] Cannot assign requested
在用python进行socket编程的时候,你可能会在进行connect的时候发现系统给你报了这么个错误: socket.error: [Errno 99] Cannot assign requested address 网上你去搜,基本都是说bind的时候,地址已经被用了,都是胡扯。地址被用报的错误应该是: Address already in use才对 然后我看得都是英文的,说明外国转载 2013-09-06 08:41:06 · 36920 阅读 · 1 评论 -
Eric4配置python3
1、修改python默认文件关联 2、修改python3文件关联,添加python3路径。 3、随便打开一个文件,运行。不管有错没。原创 2013-10-31 10:00:58 · 941 阅读 · 0 评论 -
pyside-lupdate 解析问题
最近在用python做一个界面项目。以前都是用C++ 做Qt的。python支持PyQt,Pyside。Pyside和c++ Qt支持比较好。都是诺基亚推出的。 简单用了一下PyQt感觉不是很好用。 不过Pyside的bug挺多的。很多和c++版本的Qt运行效果不一样。 在做翻译的时候。发现pyside-lupdate有点问题。 所有类都从QObject继承。出现了unamed conte原创 2013-11-19 17:11:28 · 1970 阅读 · 0 评论 -
matplotlib画图时的中文设置
采用matplotlib作图时默认设置下是无法显示中文的,例如编写如下python脚本, #-*- coding: utf-8 -*- from pylab import * t = arange(-4*pi, 4*pi, 0.01) y = sin(t)/t plt.plot(t, y) plt.title(u'钟形函数') plt.xlabel(u'时间') plt.yla转载 2013-12-05 16:17:24 · 1377 阅读 · 0 评论 -
matplotlib x轴时间显示
matplotlib提供的接口: ax.xaxis.set_major_locator(hours) ax.xaxis.set_major_formatter(yearsFmt) figure.autofmt_xdate()原创 2013-12-31 16:05:46 · 30308 阅读 · 0 评论 -
python 调用mysql存储过程返回结果集
存储过程: delimiter | create procedure get_product_info(in imid int(10),int iuser varchar(20)) begin select * from tb_test where mid = imid and user = iuser; end; | delimiter ; python代码: impor原创 2013-12-20 17:33:15 · 6175 阅读 · 0 评论 -
python用cx_Freeze打包程序
在python中比较常用的转exe方法有三种,分别是cx_freeze,py2exe,PyInstaller。py2exe恐怕是三者里面知名度最高的一个,但是同时相对来说它的打包质量恐怕也是最差的一个。pyinstaller打包很好,但是操作工序较为复杂。个人还是推荐cx_freeze。 cx_freeze下载地址: http://sourceforge.net/projects原创 2013-11-19 17:53:51 · 15492 阅读 · 1 评论 -
用Python读取Excel(*.xls)文件——xlrd模块的使用
使用 xlrd 能够很方便的读取 excel 文件内容,而且这是个跨平台的库,能够在windows,linux/unix,等平台上面使用。 软件可以去这个地址http://www.lexicon.net/sjmachin/xlrd.htm下载。 import xlrd fname = "sample.xls" bk = xlrd.open_workbook(fname) shx转载 2013-08-30 08:38:03 · 3251 阅读 · 0 评论 -
Python Pysde 离线文档
Pysde Document下载路径:https://github.com/seanfisk/pyside-docs/tree/gh-pages原创 2015-04-20 22:19:34 · 1147 阅读 · 1 评论