标准库
runningtortoise
这个作者很懒,什么都没留下…
展开
-
Python标准库参考笔记-copy
Python标准库参考笔记-copy9.17 copy地址:http://docs.python.org/library/copy.html # -*- coding: cp936 -*-import copyprint ------------------------------------copy example----------------------------原创 2009-07-19 09:26:00 · 547 阅读 · 0 评论 -
Python标准库参考-String Services(2)
地址:http://docs.python.org/library/strings.html8.5 StringIOStringIO允许我们像文件一样操作一个字符串。例如:>>> import StringIO>>> s = StringIO.StringIO()>>> dir(s)[__doc__, __init__, __iter__, __modul原创 2009-06-05 22:25:00 · 1066 阅读 · 0 评论 -
Python标准库参考-sched
9.8 sched地址:http://docs.python.org/library/sched.html可以做计划任务,就是在指定的延时之后执行一段程序。sched.scheduler(timefunc, delayfunc) 接受两个参数,timefunc必须在没有参数的情况下也能调用,返回延时数字(单位无所谓)。delayfunc接受一原创 2009-06-07 20:31:00 · 2344 阅读 · 0 评论 -
Python标准库参考-collections
Normal 0 7.8 磅 0 2 false false false EN-US ZH-CN X-NONE原创 2009-06-07 15:09:00 · 2163 阅读 · 0 评论 -
Python标准库参考-String Services
地址:http://docs.python.org/library/strings.html8.1 常见的string操作介绍了一些常量。例如string.ascii_letters代表所有的大小写英文字幕。下面讲解了字符串的格式化操作,看起来比较吃力,近期应用的可能也不大,越过。 8.2 正则表达式介绍了正转载 2009-06-03 23:46:00 · 722 阅读 · 0 评论 -
Python标准库参考-Data Types-datetime
地址:http://docs.python.org/library/datatypes.htmlPython提供的一些数据类型。暂时越过的模块:9.4. heapq — Heap queue algorithm9.5. bisect — Array bisection algorithm9.6. array — Efficient arr原创 2009-06-06 09:07:00 · 461 阅读 · 0 评论 -
Python标准库参考概览
<! /* Style Definitions */ table.MsoNormalTable {mso-style-name:普通表格; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qf原创 2009-05-17 12:10:00 · 406 阅读 · 0 评论 -
Python标准库参考笔记-decimal
Python标准库参考笔记-decimal10.4 decimal地址:http://docs.python.org/library/decimal.html Decimal支持大多数的数学操作。使用decimal的时候是在一个context背景下工作的。可以使用getcontext来获得当前背景: from decimal import *c = getcontext原创 2009-07-19 16:26:00 · 2104 阅读 · 0 评论 -
Python标准库参考笔记-weakref
Python标准库参考笔记-weakref9.11 weakref地址:http://docs.python.org/library/weakref.html对一个对象的弱引用。相对于通常的引用来说,如果一个对象有一个常规的引用,它是不会被垃圾收集器销毁的,但是如果一个对象只剩下一个弱引用,那么它可能被垃圾收集器收回。并非所有的对象都支持weakref,例如list和dict就不支原创 2009-07-18 16:59:00 · 2889 阅读 · 0 评论 -
Python标准库参考笔记- itertools
Python标准库参考笔记- itertools10.7 itertools地址:http://docs.python.org/library/itertools.htmlPyMOTW:http://www.doughellmann.com/PyMOTW/itertools/index.html 看官方文档看得一头雾水,直接看的PyMOTW。这篇笔记基本上是PyMOTW的翻原创 2009-07-19 21:49:00 · 845 阅读 · 0 评论 -
Python标准库参考笔记-pprint
Python标准库参考笔记-pprint9.18 pprint地址:http://docs.python.org/library/pprint.html 以漂亮的格式打印。打印输出可以作为解释器的合法输入。 # -*- coding: cp936 -*-import copyimport pprinta = [1,2,3,4]b = [a,a,a,a,a,a原创 2009-07-19 10:43:00 · 927 阅读 · 0 评论 -
Python标准库参考-calendar
9.2 calendar地址:http://docs.python.org/library/calendar.html用来输出日历的模块,提供了TextCalender和HTMLCalendar,LocaleTextCalendar和LocaleHTMLCalendar。 例如:import calendarc = calendar.TextCalendar()原创 2009-06-07 10:08:00 · 1305 阅读 · 0 评论