Differences between revisions 2 and 6 (spanning 4 versions)
Revision 2 as of 2008-12-07 05:48:00
Size: 5060
Editor: ShenXiaoFeng
Comment:
Revision 6 as of 2008-12-07 07:31:12
Size: 4164
Editor: ShenXiaoFeng
Comment:
Deletions are marked like this. Additions are marked like this.
Line 9: Line 9:
== 13.1. "Tune In, Log On, and Drop Out" 收听,登入和脱离 ==
Over the last decade, the Internet has virtually exploded onto the mainstream stage. It has rapidly grown from a simple communication device used primarily by academics and researchers into a medium that is now nearly as pervasive as the television and telephone. Social observers have likened the Internet's cultural impact to that of the printing press, and technical observers have suggested that all new software development of interest occurs only on the Internet. Naturally, time will be the final arbiter for such claims, but there is little doubt that the Internet is a major force in society, and one of the main application contexts for modern software systems.
== 13.1. "Tune In, Log On, and Drop Out" 收听,登入和脱离
Line 14: Line 13:
在过去十几年,因特网技术事实上已经发展成主流技术。它的快速发展,使这种本来是大专院校里,研究者之间一种简单的交流设备,现在变成广泛的信息交流媒介,在电视机与电话机之间也可交流信息。社会学者把因特网文化影响的重要性比作当年印刷机的出现。技术学者还认为以后的软件发展应该建基于因特网。一些相关的言论,最后将随着时间得出结论,但不用置疑的是,因特网已经成为影响社会的重要力量,也是现代计算机软件系统的一个主要应用领域。       在过去十几年,因特网技术事实上已经发展成主流技术。它的快速发展,使这种本来是大专院校里,研究者之间一种简单的交流设备,现在变成广泛的信息交流媒介,在电视机与电话机之间也可交流信息。社会学者把因特网文化影响的重要性比作当年印刷机的出现。技术学者还认为以后的软件发展应该建基于因特网。一些相关的言论,最后将随着时间得出结论,但不用置疑的是,因特网已经成为影响社会的重要力量,也是现代计算机软件系统的一个主要应用领域。
Line 17: Line 16:

The Internet also happens to be one of the primary application domains for the Python programming language. It has been a decade since the first edition of this book was written as well, and in that time the Internet's growth has strongly influenced Python's tool set and roles. Given Python and a computer with a socket-based Internet connection today, we can write Python scripts to read and send email around the world, fetch web pages from remote sites, transfer files by FTP, program interactive web sites, parse HTML and XML files, and much more, simply by using the Internet modules that ship with Python as standard tools.
Line 23: Line 20:

In fact, companies all over the world do: Google, Yahoo!, Walt Disney, Hewlett-Packard, JPL, and many others rely on Python's standard tools to power their web sites. For example, the Google search enginewidely credited with making the web usablemakes extensive use of Python code. And the BitTorrent peer-to-peer file transfer systemwritten in Python and already downloaded by tens of millions of usersleverages Python's networking skills to share files among clients and remove server bottlenecks.

Many also build and manage their sites with the Zope web application server, which is itself written and customizable in Python. Others build sites with the Plone content management system, which is built upon Zope and delegates site content to its users. Still others use Python to script Java web applications with Jython (formerly known as JPython)a system that compiles Python programs to Java bytecode, exports Java libraries for use in Python scripts, and allows Python code to serve as web applets downloaded and run in a browser.
事实上,全世界很多大公司如Google, Yahoo!, Walt Disney, Hewlett-Packard, JPL等,都利用Python标准工作去建立它们强大的网站。举例说,google搜索引擎广泛使用Python代码来扩展网络的使用。BitTorrent(点对点文件传输软件)是用Python写的,超过千万的用户下载该软件并使用,在Python的网络处理技术的帮助下,用户突破了服务器的数据传输瓶颈来分享文件。
Line 30: Line 24:
More recently, XML-RPC and SOAP interfaces for Python, such as xmlrpclib and SOAPy, have enabled web service programming; frameworks such as CherryPy, Webware, TurboGears, and Django have emerged as convenient tools for constructing web sites; the new XML package in Python's standard library provides a suite of XML processing tools; and the new IronPython implementation promises to provide seamless .NET/Mono integration for Python code. 也有很多人使用Zope的网络框架服务器来建立与管理他们的网站,同样,Zope也是用Python来编写与定制的。也有人使用plone来建立网站,而plone是建立在Zope之上的。另外,还有人用Python语言生产java码,让其生产代码运行于java平台(JPython),这种扩展,也使得Python能使用Java函数库,也使得Python代码作为Web applets让浏览器下载与运行。
Line 32: Line 26:
近来,Python也具备了Web Server编程的能力,因为Python有了XML-RPC和 SOAP的接口,如 xmlrpclib and SOAPy。一些框架如CherryPy, Webware, TurboGears, Django作为便利的建立网站的工作也出现。新的XML包出现,使Python有了处理XML的工具。 新的IronPython实现了Python代码与.NET/Mono的无缝结合。
Line 33: Line 28:
随着网络的发展,Python在因特网工具中是一个重要的角色。Python已经证实是适合用于编写网络脚本,理由与它在其他领域一样,它使程序实现理想化。模块化的设计与快速编程的能力都适合网络开发的要求。在本书的这个部分,我们可以发现Python很好地支持网络脚本的编写。它使网络程序的开发质量(开发效率与可维护性)得到提高。
Line 34: Line 30:
As the Internet has grown, so too has Python's role as an Internet tool. Python has proven to be well suited to Internet scripting for some of the very same reasons that make it ideal in other domains. Its modular design and rapid turnaround mix well with the intense demands of Internet development. In this part of the book, we'll find that Python does more than simply support Internet scripts; it also fosters qualities such as productivity and maintainability that are essential to Internet projects of all shapes and sizes. === 13.1.1. Internet Scripting Topics ===
##startInc
Internet programming entails many topics, so to make the presentation easier to digest, I've split this subject over the next six chapters of this book. This chapter introduces Internet fundamentals and explores sockets, the underlying communications mechanism of the Internet. From there, later chapters move on to discuss the client, the server, web site construction, and more advanced topics.
Line 36: Line 34:
= 文章大标 =
##startInc
Each chapter assumes you've read the previous one, but you can generally skip around, especially if you have any experience in the Internet domain. Since these chapters represent a substantial portion of this book at large, the following sections go into a few more details about what we'll be studying.

TableOfContents

Include(ZPyUGnav)

== 13.1. "Tune In, Log On, and Drop Out" 收听,登入和脱离

  • 在过去十几年,因特网技术事实上已经发展成主流技术。它的快速发展,使这种本来是大专院校里,研究者之间一种简单的交流设备,现在变成广泛的信息交流媒介,在电视机与电话机之间也可交流信息。社会学者把因特网文化影响的重要性比作当年印刷机的出现。技术学者还认为以后的软件发展应该建基于因特网。一些相关的言论,最后将随着时间得出结论,但不用置疑的是,因特网已经成为影响社会的重要力量,也是现代计算机软件系统的一个主要应用领域。

Python编程语言的一个重要的应用领域就是因特网。这本书的第一版书写到现在的十年间,因特网飞速发展,影响着Python语言的工具集的发展和Python的角色变化。给我们一台连着网络的计算机与Python编程环境,我们就能写着Python脚本来收发电邮,从远程的服务器抓取网页,用FTP传输文件,做交互式的网站,分析HTML和XML文件。做这么多的工作,其实就是简单地利用了Python的Internet modules(因特网模块)。

事实上,全世界很多大公司如Google, Yahoo!, Walt Disney, Hewlett-Packard, JPL等,都利用Python标准工作去建立它们强大的网站。举例说,google搜索引擎广泛使用Python代码来扩展网络的使用。BitTorrent(点对点文件传输软件)是用Python写的,超过千万的用户下载该软件并使用,在Python的网络处理技术的帮助下,用户突破了服务器的数据传输瓶颈来分享文件。

也有很多人使用Zope的网络框架服务器来建立与管理他们的网站,同样,Zope也是用Python来编写与定制的。也有人使用plone来建立网站,而plone是建立在Zope之上的。另外,还有人用Python语言生产java码,让其生产代码运行于java平台(JPython),这种扩展,也使得Python能使用Java函数库,也使得Python代码作为Web applets让浏览器下载与运行。

近来,Python也具备了Web Server编程的能力,因为Python有了XML-RPC和 SOAP的接口,如 xmlrpclib and SOAPy。一些框架如CherryPy, Webware, TurboGears, Django作为便利的建立网站的工作也出现。新的XML包出现,使Python有了处理XML的工具。 新的IronPython实现了Python代码与.NET/Mono的无缝结合。

随着网络的发展,Python在因特网工具中是一个重要的角色。Python已经证实是适合用于编写网络脚本,理由与它在其他领域一样,它使程序实现理想化。模块化的设计与快速编程的能力都适合网络开发的要求。在本书的这个部分,我们可以发现Python很好地支持网络脚本的编写。它使网络程序的开发质量(开发效率与可维护性)得到提高。

13.1.1. Internet Scripting Topics

Internet programming entails many topics, so to make the presentation easier to digest, I've split this subject over the next six chapters of this book. This chapter introduces Internet fundamentals and explores sockets, the underlying communications mechanism of the Internet. From there, later chapters move on to discuss the client, the server, web site construction, and more advanced topics.

Each chapter assumes you've read the previous one, but you can generally skip around, especially if you have any experience in the Internet domain. Since these chapters represent a substantial portion of this book at large, the following sections go into a few more details about what we'll be studying.

章标题1

小节标题1

   1 Python code


  • 反馈

创建 by @ShenXiaoFeng@ [@20081107@]

PageComment2

[:PP3eD/Ch-13-1/PageCommentData:PageCommentData]'

PP3eD/Ch-13-1 (last edited 2009-12-25 07:09:36 by localhost)