文章分类 - Python
python,django
摘要:转自:http://hi.baidu.com/limodou/item/72da32384b25c7ff97f88df1http://hi.baidu.com/limodou/item/4a13b3107fca86f89d778af1如果你的程序要考虑时区,可以使用pytz。datetime模块中有tzinfo相关的东西,但是它是一个抽象类,文档上说:tzinfois an abstract base clase, meaning that this class should not be instantiated directly. You need to derive a concrete
阅读全文
摘要:from:http://blog.sina.com.cn/s/blog_4a071ed801018qv9.html由于程序需要用到python,而centos自带的python 2.6版本太低了,而yum命令只支持python 2.6 ,所以就另外安装一个python 2.7,下载编译安装python 2.7wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgztar zxvf Python-2.7.3.tgzcd Python-2.7.3./configuremakemake installmv /usr/bin/python
阅读全文
摘要:from:http://www.cnblogs.com/smiler/archive/2010/08/02/1790132.htmlpython中函数参数的传递是通过赋值来传递的。函数参数的使用又有俩个方面值得注意:1.函数参数是如何定义的 2.在调用函数的过程中参数是如何被解析先看第一个问题,在python中函数参数的定义主要有四种方式:1.F(arg1,arg2,...)这 是最常见的定义方式,一个函数可以定义任意个参数,每个参数间用逗号分割,用这种方式定义的函数在调用的的时候也必须在函数名后的小括号里提供个数相等的 值(实际参数),而且顺序必须相同,也就是说在这种调用方式中,形参和实参的
阅读全文
浙公网安备 33010602011771号