Core Python Applications Programming

Wesley J Chun

出版社

Prentice Hall

出版时间

2012-03-09

ISBN

9780132678209

评分

★★★★★
书籍介绍
* Already know Python but want to learn more? A lot more? Dive into a variety of topics used in practice for real-world applications. * Covers regular expressions, Internet/network programming, GUIs, SQL/databases/ORMs, threading, and Web development. * Learn about contemporary development trends such as Google+, Twitter, MongoDB, OAuth, Python 3 migration, and Java/Jython. Presents brand new material on Django, Google App Engine, CSV/JSON/XML, and Microsoft Office. Includes Python 2 and 3 code samples to get you started right away! * Provides code snippets, interactive examples, and practical exercises to help build your Python skills. The Complete Developer's Guide to Python Python is an agile, robust, and expressive programming language that continues to build momentum. It combines the power of compiled languages with the simplicity and rapid development of scripting languages. In Core Python Applications Programming, Third Edition, leading Python developer and corporate trainer Wesley Chun helps you take your Python knowledge to the next level. This book has everything you need to become a versatile Python developer. You will be introduced to multiple areas of application development and gain knowledge that can be immediately applied to projects, and you will find code samples in both Python 2 and 3, including migration tips if that's on your roadmap too. Some snippets will even run unmodified on 2.x or 3.x. * Learn professional Python style, best practices, and good programming habits * Build clients and servers using TCP, UDP, XML-RPC, and be exposed to higher-level libraries like SocketServer and Twisted * Develop GUI applications using Tkinter and other available toolkits * Improve application performance by writing extensions in C/C++, or enhance I/O-bound code with multithreading * Discover SQL and relational databases, ORMs, and even non-relational (NonSQL) databases like MongoDB * Learn the basics of Web programming, including Web clients and servers, plus CGI and WSGI * Expose yourself to regular expressions and powerful text processing tools for creating and parsing CSV, JSON, and XML data * Interface with popular Microsoft Office applications such as Excel, PowerPoint, and Outlook using COM client programming * Dive deeper into Web development with the Django framework and cloud computing with Google App Engine * Explore Java programming with Jython, the way to run Python code on the JVM * Connect to Web services Yahoo! Finance to get stock quotes, or Yahoo! Mail, Gmail, and others to download or send e-mail * Jump into the social media craze by learning how to connect to the Twitter and Google+ networks Core Python Applications Programming, Third Edition, delivers *Broad coverage of a variety of areas of development used in real-world applications today *Powerful insights into current and best practices for the intermediate Python programmer *Dozens of code examples, from quick snippets to full-fledged applications *A variety of exercises at the end of every chapter to help hammer the concepts home
精彩摘录
  • "有一个更好的方案,许多Unix系统有一个命令叫env,位于/bin或/usr/bin中。它会帮你在系统搜索路径中找到python解释器。如果你的系统拥有env,你的启动行就可以改为下面这样。"
  • "print语句也支持将输出重定向到文件。这个特性是从Python2.0开始新增的。符号>>用来重定向输出"
  • "URL使用这种格式: prot_sch://net_loc/path;params?query#frag prot_sch 网络协议或者下载规划 net_loc 服务器位置(或许也有用户信息) path 斜杠(/)限定文件或者CGI应用程序的路径 params 可选参数 query 连接符(&)连接键值对 frag 拆分文档的特殊锚 net_loc 可以进一步拆分成多个部件, 有些是必备, 其他的是可选部件, net_loc 字符串如下: user:passwd@host:port"
  • "在我们研究CGI之前, 我们必须告诉你典型的Web应用已经不再使用CGI了。"
  • "Why must keys be hashable? The hash function used by the interpreter to calculate where to store your data is based on the value of your key. If the key was a mutable object, its value could be changed. If a key changes, the hash function will map to a different place to store the data. If that was "
  • "The defining PEP (234) cites that iterators: ● Provide an extensible iterator interface. ● Bring performance enhancements to list iteration. ● Allow for big performance improvements in dictionary iteration. ● Allow for the creation of a true iteration interface as opposed to overriding methods origi"
  • "FTP 是客户端/服务器编程中很“与众不同”的例子。客户端和服务器都使用两个套接字来通讯:一个是控制和命令端口(21 号端口),另一个是数据端口(有时是20 号端口)。"
  • "注意:字典中的键必须是可哈希的,所以数字和字符可以作为字典中的键,但是列表和其他字典不行"
下载
收藏