今天遇到java调用一个python脚本的问题,纠结了大半天,遇到各种问题。网上搜索的大部分都是用jython […]
Continue readingpython读取excelxlrd
1. 去 https://pypi.python.org/pypi/xlrd/0.9.2下载xlrd-0.9. […]
Continue readingpythondjango|models
学习大牛的网站: models类修改后数据库也应同样更新,但是syncdb命令仅仅创建数据库里的表,并不对数据 […]
Continue readingpythondjango|bootstrap
1. 在ubuntu12下想安装scim,把ibus都卸载了,结果没能成功。。。放弃了一段时间想用英语更新发现 […]
Continue readingpythonthreadpractices
“””” python中使用线程有两种方式:函数或者用类来包装 […]
Continue readingpython类型转换、数值操作
函数 描述 int(x [,base ]) 将x转换为一个整数 long(x [,base ]) 将x转换为一 […]
Continue readingpython字符串内建函数
string.capitalize() 把字符串的第一个字符大写 string.center(width) 返 […]
Continue readingpython常用函数
一、数学相关 1、绝对值:abs(-1) 2、最大最小值:max([1,2,3])、min([1,2,3]) […]
Continue readingpython时间格式化
函 数strftime()的操作有些类似于sprintf():识别以百分号(%)开始的格式命令集合,格式化输出 […]
Continue readingpythontime,datetime,string转换
# 把datetime转成字符串 def datetime_tostring(dt): return dt.s […]
Continue readingpython的中文字符乱码
打算用python解析一下网络日志文件。 必然地遇上了中文乱码的问题。 小弟以前学java,用python解决 […]
Continue readingpython发送邮件smtplib
可以利用smtplib模块来实现发送邮件的功能,一个比较简单的实例代码如下: # import smtplib […]
Continue readingpython获取网站图片
# zhouxianglh 2013.05.03 python3.3 import urllib.reques […]
Continue reading用wxpython写的一个天气预报
自学了半个多月python和wx,想写个天气预报练练手,可是写的时候遇到了很多问题,非常纠结,索性把东西上传给 […]
Continue readingpythonmap、filter,reduce介绍
1、filter(function,iterable) 引用 construct a list from th […]
Continue readingredis
#!/usr/bin/env python #coding=utf-8 import os import sy […]
Continue readingpythontips
1、enum python代码 #!/usr/bin/env python # -*- coding:utf- […]
Continue readingpythondecorators
contains: 1、decorators 2、functools 首先我们看下tornado中使用的装饰器 […]
Continue readingpython异步网络探
异步网络据说能极大的提高网络server的连接速度,所以打算写一个专题,来学习和了解异步网络.因为python […]
Continue readingpython内存释放原则
def getinit(class_name): “””动态加载模块 […]
Continue readingpython中获取python版本号的方法
最近在思考如何使用python做自动化测试的问题,没啥进展。感觉国内自动化测试ruby用的比较多,目前想做一件 […]
Continue readingpython学习——python标准库
python标准库 python标准库是随python附带安装的,它包含大量极其有用的模块。熟悉python标 […]
Continue readingpython学习——异常
异常 当你的程序中出现某些异常的状况的时候,异常就发生了。例如,当你想要读某个文件的时候,而那个文件不存在。或 […]
Continue readingpython学习——输入输出
输入输出 文件 你可以通过创建一个file类的对象来打开一个文件,分别使用file类的read、readlin […]
Continue readingpython线程整理
线程有五种状态 新建、就绪、运行、阻塞、死亡。 阻塞有三种情况: 同步阻塞是指处于竞争锁定的状态,线程请求锁定 […]
Continue readingpythonxapian存储结构
在项目中为了支持搜索服务,我们使用xapian作为后端的搜索引擎.其因性能良好以及易用受到大家欢迎.下面是基本 […]
Continue readingpython学习
模块 简介 你已经学习了如何在你的程序中定义一次函数而重用代码。如果你想要在其他程序中重用很多函数,那么你该如 […]
Continue readingpython修改文件
#!/usr/bin/env python #coding=utf-8 import os import sy […]
Continue readingpython读入文件和time/sys模块的简单使用
python读入文件和time/sys模块的简单使用 一些标准库函数的用法也待学习,如:os/re/sets/ […]
Continue readingpython模块
模块:自我包含并且有组织的代码片段 导入(import):把其它模块中属性附加到你的模块的操作 imptee. […]
Continue reading