摘要: 1,Python老家:www.python.orgPython 2.3.4 Documentationre(正则表达式)2, python中文社区python中文手册3,IBM Python 编程系列4,书籍下载:http://www.catkitty.com/resource/computer/python/ 阅读全文
posted @ 2004-08-09 15:53 James 阅读(1359) 评论(2) 推荐(0) 编辑
摘要: python种的标准库:syssys.argv所有的参数。import sysif '-h' in sys.argv: print 'this is help\n'sys.exit( exitcode), sys.exit(0)sys.stdin, data=sys.stdin.readlines()sys.stdout,sys.stderrsys.platformsys.path,返回listt... 阅读全文
posted @ 2004-08-09 15:09 James 阅读(1016) 评论(0) 推荐(0) 编辑
摘要: 1,一些内置函数:coerce 把 两个变元变成同一种类型。>>> coerce(1,2.2)(1.0, 2.2000000000000002)filter, filter(function, list) (2)里面已经说了。input()输入一个数字>>> a=input("age: ")age: 20>>> a20open(),打开文件,o... 阅读全文
posted @ 2004-08-09 14:22 James 阅读(707) 评论(0) 推荐(0) 编辑
摘要: 1,Python中的数据类型。NoneType, TypeType(自定义类型), IntType, LongType, FloatType, ComplexType(复数), StringType, UnicodeType,TupleType, ListType, DictType, FunctionTypeLongType在python中是没有长度限制的,这个也是script的优点。2,fil... 阅读全文
posted @ 2004-08-09 13:28 James 阅读(785) 评论(0) 推荐(0) 编辑
摘要: 这周有一个项目要用python来写,没有办法,只好学习这个东西了。比起C#+VS.Net这种黄金组合来,python+vi用起来还是非常不舒服,但是工作还是比兴趣更重要,不喜欢也要硬学。首先感觉python在总体概念上和C#有很多相似的地方,比如也要生产中间byte code.1,奇怪的运算符号: divmod>>> (a, b) = divmod(10,3)>>&g... 阅读全文
posted @ 2004-08-09 08:40 James 阅读(1172) 评论(1) 推荐(0) 编辑