资源描述:
《python库参考手册》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、Python库参考手册(PythonLibraryReference)Release2.3.3GuidovanRossumFredL.Drake,Jr.,editor翻译团队:见文末名单译文最后修改:2004年3月22日PythonLabsEmail:docs@python.orgCopyrightc°2001,2002,2003PythonSoftwareFoundation.Allrightsreserved.Copyrightc°2000BeOpen.com.Allrightsreserved.Copyrightc°1995-
2、2000CorporationforNationalResearchInitiatives.Allrightsreserved.Copyrightc°1991-1995StichtingMathematischCentrum.Allrightsreserved.Seetheendofthisdocumentforcompletelicenseandpermissionsinformation.详细版权及使用许可的资料见本文的最后部份.Pythonisanextensible,interpreted,object-orientedpr
3、ogramminglanguage.Itsupportsawiderangeofapplica-tions,fromsimpletextprocessingscriptstointeractiveWebbrowsers.Python是一种可扩展的,即译式,面向对象规格的编程语言.它能应用在极广泛的地方,从简单的文字处理工作到交互式的网页浏览器.WhilethePythonReferenceManualdescribestheexactsyntaxandsemanticsofthelanguage,itdoesnotdescribet
4、hestandardlibrarythatisdistributedwiththelanguage,andwhichgreatlyenhancesitsimmediateusability.Thislibrarycontainsbuilt-inmodules(writteninC)thatprovideaccesstosystemfunctionalitysuchasfileI/OthatwouldotherwisebeinaccessibletoPythonprogrammers,aswellasmoduleswritteninPy
5、thonthatprovidestandardizedsolutionsformanyproblemsthatoccurineverydayprogramming.SomeofthesemodulesareexplicitlydesignedtoencourageandenhancetheportabilityofPythonprograms.Python语言参考手册中精确地描述了Python语言的句法及语义.然而语言参考手册中没有提到Python所附带功能强大的标准库.这个函式库大大地增强了Python的实用性.其中包括C写的内建
6、模组,提供介面让程式进行操作系统层次的工作,例如档案的输出输入;同时也有以Python语言本身编写的模组,为实际编程时常遇的问题提供标准解决方案.这类模组有的经过特别设计以便Python程式在跨平台的情况下运行无误.ThislibraryreferencemanualdocumentsPython’sstandardlibrary,aswellasmanyoptionallibrarymodules(whichmayormaynotbeavailable,dependingonwhethertheunderlyingplatform
7、supportsthemandontheconfigurationchoicesmadeatcompiletime).Italsodocumentsthestandardtypesofthelanguageanditsbuilt-infunctionsandexceptions,manyofwhicharenotorincompletelydocumentedintheReferenceManual.本参考手册罗列并说明了Python标准库的各种功能,以及许多非核心的模组(按不同的操作系统和编译时的设置而定,不是每台机上的Python
8、都能用这些模组.)本手册同时记载了Python语言所有的标准数据类型,内建函数,异常类,这些在参考手册中被忽略了或只是扼要的提过一下.ThismanualassumesbasicknowledgeaboutthePythonlangu