易截截图软件、单文件、免安装、纯绿色、仅160KB

python中常用日期操作总结

http://hbszyandong.javaeye.com/blog/377199
# -*- coding: utf-
8
 -*-  
from datetime import
 datetime  
from datetime import
 date  
from time import
 strftime  
from time import
 strptime  
from datetime import
 timedelta  
def getCurDate():  
    ""
"Return value of the date"
""
  
    return
 date(datetime.now().year,datetime.now().month,datetime.now().day)  
  
def getCurTime():  
    ""
"Return value of the datetime"
""
  
    return
 datetime.now()  
      
def converDateTimeToStr(cdate,format='%Y-%m-%d %H:%M:%S'
):  
    ""
"  
    Convert datetime to String  
    cdata parameter must be the datetime or date of  
    Return value of the date string format(%Y-%m-%d)  
    ""
"  
    sdate = None  
    try
:  
        sdate = cdate.strftime(format)  
    except:  
        raise ValueError  
    return
 sdate  
  
def converDateToDateTime(fdate):  
    ""
"  
  &


相关文档:

[独家]Google将限制Python语言的应用 开发社区热议

2009-11-16 
Collin Winter是Python社区一位颇具影响力的开发者,他曾是CPython项目的核心开发者之一、也曾是Unladen Swallow(见文末注释)的核心开发者,参与了很多Python项目的开发。近来传闻Google将在其新项目中限制Python的使用,为此有开发者(以K表示)在Google 论坛中公开询问了Collin Winter,Collin Winte ......

eat python 003

Documentation for C's fopen():
---
r Open text file for reading. The stream is positioned at the beginning
of the file.
r+ Open for reading and writing. The stream is positioned at the
beginning of the file.
w Truncate file to zero length or create text file for writing. The
stream is posi ......

[转]使用python调用计算所分词

发信人: TRAD (GFans), 信区: NLP
标  题: 原创:使用python调用计算所分词
发信站: 水木社区 (Mon Nov 23 13:30:46 2009), 站内
代码很简单,但我自己摸索了一下午,发出来共享一下
把这个文件同ICTALAS30.DLL ,DATA文件夹,Configure.xm l放在同一个目录下即可。
python代码
#coding:gb2312 
from cty ......

Python字符串操作

 #Python字符串操作
''
'1.复制字符串'
''
#strcpy(
sStr1,
sStr2)
sStr1 =
'strcpy'
sStr2 =
sStr1
sStr1 =
'strcpy2'
print
sStr2
''
'2.连接字符串'
''
#strcat(
sStr1,
sStr2)
sStr1 =
'strcat'
sStr2 =
'append'
sStr1 +
=
sStr2
print
sStr1
''
'3.查找字符'
''
#strc ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号