欢迎来到天天文库
浏览记录
ID:34316938
大小:81.43 KB
页数:25页
时间:2019-03-04
《socket-programming-in-python-1201718479603606-4.pdf》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、SocketsprogramminginPythonDevelopnetworkingapplicationsusingPython'sbasicsocketsfeaturesSkillLevel:IntermediateM.TimJones(mtj@mtjones.com)SeniorPrincipalSoftwareEngineerEmulexCorp.04Oct2005Thistutorialshowshowtodevelopsockets-basednetworkingapplicationsusingPyth
2、on.Inthistutorial,youfirstlearnafewPythonbasicsandseewhyPythonmakesagoodnetworkprogramminglanguage.ThenyoumoveontothebasicsocketsfeaturesofPython,usingasamplechatapplicationasaguide,andlookatseveralother,high-level,classesthatprovideasynchronouscommunications.Se
3、ction1.BeforeyoustartAboutthistutorialPythonisapopularobject-orientedscriptinglanguagewithasimplesyntaxandalargedeveloperbase.Itisageneralpurposelanguageandcanbeusedinavarietyofsettings.It'salsopopularasabeginner'sprogramminglanguage,muchliketheBASIClanguageofth
4、e1970s.ThistutorialdemonstratesthePythonlanguagewithemphasisonnetworkingprogramming.IdefinethebasicsocketsfeaturesofPythoninadditiontosomeofPython'sotherclassesthatprovideasynchronoussockets.IalsodetailPython'sapplication-layerprotocolclasses,showinghowtobuildWe
5、bclients,mailserversandclients,andmore.SocketsprogramminginPython©CopyrightIBMCorporation1994,2006.Allrightsreserved.Page1of25developerWorks®ibm.com/developerWorksIalsodemonstrateasimplechatservertoillustratethepowerofPythonforsocketsapplications.Youshouldhaveab
6、asicunderstandingofthestandardBSDSocketsAPIandsomeexperiencewiththeGNU/Linux®environment.Somefamiliaritywithobject-orientedconceptsisalsobeneficial.PrerequisitesThistutorialandtheexamplesdemonstratedinitrelyonversion2.4ofPython.YoucandownloadthisversionfromthePy
7、thonWebsite(seeResourcesforalink).TobuildthePythoninterpreter,youneedtheGNUCcompiler(gcc)andtheconfigure/makeutilities(whicharepartofanystandardGNU/Linuxdistribution).YoushouldhaveabasicunderstandingofthestandardBSDSocketsAPIandsomeexperiencewiththeGNU/Linuxenvi
8、ronment.Somefamiliaritywithobject-orientedconceptsisalsobeneficial.Section2.IntroducingPythonFirst,I'llprovideatasteofPython.WhatisPython?Pythonisageneralpurposeobjec
此文档下载收益归作者所有
点击更多查看相关文章~~