
Python
wensishuai
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
testPython
file = open('xxx.txt','a') p = subprocess.Popen('dir',stdout=subprocess.PIPE,shell=True) print >>file,p.pid print >>file,p.retur原创 2011-08-09 20:26:21 · 460 阅读 · 0 评论 -
Python学习(一)——学习资源记录
下面是常用的入门和查找的资源:官方参考文档:http://docs.python.org/release/2.6.7/index.html (学习tutorial和standard library常用函数)google的Python class:http://co原创 2011-08-09 22:34:18 · 646 阅读 · 0 评论 -
Python学习(二)——常用功能
1、获取当前时间:import timeTIMEFORMAT = '%Y%m%d%H%M%S'self.curtimestr = time.strftime( TIMEFORMAT, time.localtime(time.time()))原创 2011-08-10 19:05:18 · 744 阅读 · 0 评论 -
Python学习(四)——Python单元测试
pyunit框架'''Created on Aug 10, 2011@author: wensi'''import unittestclass TestClass1(unittest.TestCase): def testCase1(self):原创 2011-08-10 22:29:51 · 773 阅读 · 0 评论 -
Python学习(三)——正则表达式模块
re.matchmatch从字符串的开头进行匹配(注意是开头!!!)text = "wensishuai is a handsome boy, he is cool, clever, and so on..."m = re.match(r'(w\w+)\s', te原创 2011-08-10 22:12:15 · 1799 阅读 · 0 评论