出版时间:2011-5 出版社:东南大学出版社 作者:鲁兹
Tag标签:无
内容概要
本书是由Mark
Lutz编写的《Python编程(影印版第4版)》。《Python编程(影印版第4版)》的内容包括:
Python快速入门:搭建一个简单的例子,包括数据表示、面向对象编程、对象持久化、GUI和网站基础;系统编程:针对命令行脚本编写、处理文件和文件夹、并行运行程序等需求探索系统接口工具和技术;
GUI编程:学习使用Python tkinter组件库来创建完整的用户界面;
互联网编程:访问客户端网络协议和电子邮件工具,使用CGI脚本,以及学习网站搭建技术;更多应用Python的地方:实现数据结构,分析基于文本的信息,访问数据库,以及扩展和嵌入Python。
作者简介
Mark
Lutz是Python培训的世界领先者,他是最早和最畅销Python著作的作者,从1992年起就是Python社区的先锋人物。Mark有25年的软件开发经验而且是《Python编程》前一版的作者,也是O’Reilly的《Learning
Python and Python Pocket Reference》的作者。
书籍目录
Preface
Part I. The Beginning
1. A Sneak Preview
Part II. System Programming
2. System Tools
3. Script Execution Context
4. File and Directory Tools
5. Parallel System Tools
6. Complete System Programs
Part III. GUI Programming
7. Graphical User Interfaces
8. A tkinter Tour, Part
9. A tkinter Tour, Part 2
10. GUI Coding Techniques
11. Complete GUI Programs
Part IV. Internet Programming
12. Network Scripting
13. Client-Side Scripting
14. The PyMailGUI Client
15. Server-Side Scripting
16. The PyMailCGI Server
Part V. Tools and Techniques
17. Databases and Persistence
18. Data Structures
19. Text and Language
20. Python/C Integration
Part VI. The End
21. Conclusion: Python and the Development Cycle
Index
章节摘录
版权页: 插图: The "browse" button in Figure 10-7 pops up a file selection dialog just as the packdlg form did.Instead of an OK button,this dialog binds the Enter key-press event to kill the window and end the modalwait state pause; on submission, the name of the packed file is passed to the main function of the unpacker script shown earlier to perform the actual file scan process. Room forimprovement All of this works as advertised-by making command-line tools available in graphical form like this, they become much more attractive to users accustomed to the GUI way of life.We've effectively added a simple GUI front-end to command-line tools.Still, two aspects of this design seem prime for improvement. First, both of the input dialogs use common code to build the rows of their input forms, but it's tailored to this specific use case; we might be able to simplify the dialogs further by importing a more generic form-builder module instead.We met general form builder code in Chapters 8 and 9, and we'll meet more later-see the form.py module in Chapter 12 for pointers on further genericizing form construction. Second, at the point where the user submits input data in either form dialog,we've lost the GUI trail-the GUI is blocked, and messages are routed back to the console.The GUI is technically blocked and will not update itselfwhile the pack and unpack utilities run; although these operations are fast enough for my files as to be negligible,we would probably want to spawn these calls off in threads for very large files to keep the main GUI thread active (more on threads later in this chapter). The console issue is more blatant: packer and unpacker messages still show up in the stdout console window, not in the GUI (all the filenames here include full directory paths if you select them with the GUI's Browse buttons, courtesy of the standard Open dialog): C:\...\PP4E\Gui\5hellGui\temp> python ..\mytools.py list PP4E saolledtext list test Packer: packed.all ('spam.txt', 'ham.txt', 'eggs.txt') packing: spam.txt packing: ham.txt packing: eggs.txt Unpacker: packed.all creating: spam.txt creating: ham.txt creating: eggs.txt.
编辑推荐
《Python编程(影印版)(第4版)(套装共2册)》针对该语言的主要应用领域——系统管理、GUI和Web——做了深入讲解,并且探索了它在数据库、网络、前端脚本撰写层、文本处理和更多方面的使用。通过重点关注常用工具和库,你将会对Python在实际现实世界里的编程有更深的理解。你将通过一种清晰和简洁的方式——讲解大量正确用法和常见惯例的例子——学会语言的语法和编程技巧。《Python编程(影印版)(第4版)(套装共2册)》针对3.x版本做了完全的更新,它探讨了Python如何成为软件开发工具,并且特别为此设计了很多代码示例。
图书封面
图书标签Tags
无
评论、评分、阅读与下载