Python编程(第四版,影印版,上下卷)
Mark Lutz
出版时间:2011年06月
页数:1584
在你掌握Python的基本原理之后,你会如何应用它呢?本书针对该语言的主要应用领域——系统管理、GUI和Web——做了深入讲解,并且探索了它在数据库、网络、前端脚本撰写层、文本处理和更多方面的使用。通过重点关注常用工具和库,你将会对Python在实际现实世界里的编程有更深的理解。
你将通过一种清晰和简洁的方式——讲解大量正确用法和常见惯例的例子——学会语言的语法和编程技巧。《Python编程》针对3.x版本做了完全的更新,它探讨了Python如何成为软件开发工具,并且特别为此设计了很多代码示例。

内容包括:
· Python快速入门:搭建一个简单的例子,包括数据表示、面向对象编程、对象持久化、GUI和网站基础
· 系统编程:针对命令行脚本编写、处理文件和文件夹、并行运行程序等需求探索系统接口工具和技术
· GUI编程:学习使用Python tkinter组件库来创建完整的用户界面
· 互联网编程:访问客户端网络协议和电子邮件工具,使用CGI脚本,以及学习网站搭建技术
· 更多应用Python的地方:实现数据结构,分析基于文本的信息,访问数据库,以及扩展和嵌入Python

“这些章节提供了从问题调查到设计规范等各个方面的内容,它着重于现实问题并且避开常见的障碍。”
——Diane Donovan
California Bookwatch

Mark Lutz是Python培训的世界领先者,他是最早和最畅销Python著作的作者,从1992年起就是Python社区的先锋人物。Mark有25年的软件开发经验而且是《Python编程》前一版的作者,也是O’Reilly的
《Learning Python and Python Pocket Reference》的作者。

适用于有编程经验的读者
  1. Preface
  2. Part I. The Beginning
  3. 1. A Sneak Preview
  4. “Programming Python: The Short Story”
  5. The Task
  6. Step 1: Representing Records
  7. Using Lists
  8. Using Dictionaries
  9. Step 2: Storing Records Persistently
  10. Using Formatted Files
  11. Using Pickle Files
  12. Using Per-Record Pickle Files
  13. Using Shelves
  14. Step 3: Stepping Up to OOP
  15. Using Classes
  16. Adding Behavior
  17. Adding Inheritance
  18. Refactoring Code
  19. Adding Persistence
  20. Other Database Options
  21. Step 4: Adding Console Interaction
  22. A Console Shelve Interface
  23. Step 5: Adding a GUI
  24. GUI Basics
  25. Using OOP for GUIs
  26. Getting Input from a User
  27. A GUI Shelve Interface
  28. Step 6: Adding a Web Interface
  29. CGI Basics
  30. Running a Web Server
  31. Using Query Strings and urllib
  32. Formatting Reply Text
  33. A Web-Based Shelve Interface
  34. The End of the Demo
  35. Part II. System Programming
  36. 2. System Tools
  37. “The os.path to Knowledge”
  38. Why Python Here?
  39. The Next Five Chapters
  40. System Scripting Overview
  41. Python System Modules
  42. Module Documentation Sources
  43. Paging Documentation Strings
  44. A Custom Paging Script
  45. String Method Basics
  46. Other String Concepts in Python 3.X: Unicode and bytes
  47. File Operation Basics
  48. Using Programs in Two Ways
  49. Python Library Manuals
  50. Commercially Published References
  51. Introducing the sys Module
  52. Platforms and Versions
  53. The Module Search Path
  54. The Loaded Modules Table
  55. Exception Details
  56. Other sys Module Exports
  57. Introducing the os Module
  58. Tools in the os Module
  59. Administrative Tools
  60. Portability Constants
  61. Common os.path Tools
  62. Running Shell Commands from Scripts
  63. Other os Module Exports
  64. 3. Script Execution Context
  65. “I’d Like to Have an Argument, Please”
  66. Current Working Directory
  67. CWD, Files, and Import Paths
  68. CWD and Command Lines
  69. Command-Line Arguments
  70. Parsing Command-Line Arguments
  71. Shell Environment Variables
  72. Fetching Shell Variables
  73. Changing Shell Variables
  74. Shell Variable Fine Points: Parents, putenv, and getenv
  75. Standard Streams
  76. Redirecting Streams to Files and Programs
  77. Redirected Streams and User Interaction
  78. Redirecting Streams to Python Objects
  79. The io.StringIO and io.BytesIO Utility Classes
  80. Capturing the stderr Stream
  81. Redirection Syntax in Print Calls
  82. Other Redirection Options: os.popen and subprocess Revisited
  83. 4. File and Directory Tools
  84. “Erase Your Hard Drive in Five Easy Steps!”
  85. File Tools
  86. The File Object Model in Python 3.X
  87. Using Built-in File Objects
  88. Binary and Text Files
  89. Lower-Level File Tools in the os Module
  90. File Scanners
  91. Directory Tools
  92. Walking One Directory
  93. Walking Directory Trees
  94. Handling Unicode Filenames in 3.X: listdir, walk, glob
  95. 5. Parallel System Tools
  96. “Telling the Monkeys What to Do”
  97. Forking Processes
  98. The fork/exec Combination
  99. Threads
  100. The _thread Module
  101. The threading Module
  102. The queue Module
  103. Preview: GUIs and Threads
  104. More on the Global Interpreter Lock
  105. Program Exits
  106. sys Module Exits
  107. os Module Exits
  108. Shell Command Exit Status Codes
  109. Process Exit Status and Shared State
  110. Thread Exits and Shared State
  111. Interprocess Communication
  112. Anonymous Pipes
  113. Named Pipes (Fifos)
  114. Sockets: A First Look
  115. Signals
  116. The multiprocessing Module
  117. Why multiprocessing?
  118. The Basics: Processes and Locks
  119. IPC Tools: Pipes, Shared Memory, and Queues
  120. Starting Independent Programs
  121. And Much More
  122. Why multiprocessing? The Conclusion
  123. Other Ways to Start Programs
  124. The os.spawn Calls
  125. The os.startfile call on Windows
  126. A Portable Program-Launch Framework
  127. Other System Tools Coverage
  128. 6. Complete System Programs
  129. “The Greps of Wrath”
  130. A Quick Game of “Find the Biggest Python File”
  131. Scanning the Standard Library Directory
  132. Scanning the Standard Library Tree
  133. Scanning the Module Search Path
  134. Scanning the Entire Machine
  135. Printing Unicode Filenames
  136. Splitting and Joining Files
  137. Splitting Files Portably
  138. Joining Files Portably
  139. Usage Variations
  140. Generating Redirection Web Pages
  141. Page Template File
  142. Page Generator Script
  143. A Regression Test Script
  144. Running the Test Driver
  145. Copying Directory Trees
  146. Comparing Directory Trees
  147. Finding Directory Differences
  148. Finding Tree Differences
  149. Running the Script
  150. Verifying Backups
  151. Reporting Differences and Other Ideas
  152. Searching Directory Trees
  153. Greps and Globs and Finds
  154. Rolling Your Own find Module
  155. Cleaning Up Bytecode Files
  156. A Python Tree Searcher
  157. Visitor: Walking Directories “++”
  158. Editing Files in Directory Trees (Visitor)
  159. Global Replacements in Directory Trees (Visitor)
  160. Counting Source Code Lines (Visitor)
  161. Recoding Copies with Classes (Visitor)
  162. Other Visitor Examples (External)
  163. Playing Media Files
  164. The Python webbrowser Module
  165. The Python mimetypes Module
  166. Running the Script
  167. Automated Program Launchers (External)
  168. Part III. GUI Programming
  169. 7. Graphical User Interfaces
  170. “Here’s Looking at You, Kid”
  171. GUI Programming Topics
  172. Running the Examples
  173. Python GUI Development Options
  174. tkinter Overview
  175. tkinter Pragmatics
  176. tkinter Documentation
  177. tkinter Extensions
  178. tkinter Structure
  179. Climbing the GUI Learning Curve
  180. “Hello World” in Four Lines (or Less)
  181. tkinter Coding Basics
  182. Making Widgets
  183. Geometry Managers
  184. Running GUI Programs
  185. tkinter Coding Alternatives
  186. Widget Resizing Basics
  187. Configuring Widget Options and Window Titles
  188. One More for Old Times’ Sake
  189. Packing Widgets Without Saving Them
  190. Adding Buttons and Callbacks
  191. Widget Resizing Revisited: Expansion
  192. Adding User-Defined Callback Handlers
  193. Lambda Callback Handlers
  194. Deferring Calls with Lambdas and Object References
  195. Callback Scope Issues
  196. Bound Method Callback Handlers
  197. Callable Class Object Callback Handlers
  198. Other tkinter Callback Protocols
  199. Binding Events
  200. Adding Multiple Widgets
  201. Widget Resizing Revisited: Clipping
  202. Attaching Widgets to Frames
  203. Layout: Packing Order and Side Attachments
  204. The Packer’s Expand and Fill Revisited
  205. Using Anchor to Position Instead of Stretch
  206. Customizing Widgets with Classes
  207. Standardizing Behavior and Appearance
  208. Reusable GUI Components with Classes
  209. Attaching Class Components
  210. Extending Class Components
  211. Standalone Container Classes
  212. The End of the Tutorial
  213. Python/tkinter for Tcl/Tk Converts
  214. 8. A tkinter Tour, Part
  215. “Widgets and Gadgets and GUIs, Oh My!”
  216. This Chapter’s Topics
  217. Configuring Widget Appearance
  218. Top-Level Windows
  219. Toplevel and Tk Widgets
  220. Top-Level Window Protocols
  221. Dialogs
  222. Standard (Common) Dialogs
  223. The Old-Style Dialog Module
  224. Custom Dialogs
  225. Binding Events
  226. Other bind Events
  227. Message and Entry
  228. Message
  229. Entry
  230. Laying Out Input Forms
  231. tkinter “Variables” and Form Layout Alternatives
  232. Checkbutton, Radiobutton, and Scale
  233. Checkbuttons
  234. Radio Buttons
  235. Scales (Sliders)
  236. Running GUI Code Three Ways
  237. Attaching Frames
  238. Independent Windows
  239. Running Programs
  240. Images
  241. Fun with Buttons and Pictures
  242. Viewing and Processing Images with PIL
  243. PIL Basics
  244. Displaying Other Image Types with PIL
  245. Creating Image Thumbnails with PIL
  246. 9. A tkinter Tour, Part 2
  247. “On Today’s Menu: Spam, Spam, and Spam”
  248. Menus
  249. Top-Level Window Menus
  250. Frame- and Menubutton-Based Menus
  251. Windows with Both Menus and Toolbars
  252. Listboxes and Scrollbars
  253. Programming Listboxes
  254. Programming Scroll Bars
  255. Packing Scroll Bars
  256. Text
  257. Programming the Text Widget
  258. Adding Text-Editing Operations
  259. Unicode and the Text Widget
  260. Advanced Text and Tag Operations
  261. Canvas
  262. Basic Canvas Operations
  263. Programming the Canvas Widget
  264. Scrolling Canvases
  265. Scrollable Canvases and Image Thumbnails
  266. Using Canvas Events
  267. Grids
  268. Why Grids?
  269. Grid Basics: Input Forms Revisited
  270. Comparing grid and pack
  271. Combining grid and pack
  272. Making Gridded Widgets Expandable
  273. Laying Out Larger Tables with grid
  274. Time Tools, Threads, and Animation
  275. Using Threads with tkinter GUIs
  276. Using the after Method
  277. Simple Animation Techniques
  278. Other Animation Topics
  279. The End of the Tour
  280. Other Widgets and Options
  281. 10. GUI Coding Techniques
  282. “Building a Better Mousetrap”
  283. GuiMixin: Common Tool Mixin Classes
  284. Widget Builder Functions
  285. Mixin Utility Classes
  286. GuiMaker: Automating Menus and Toolbars
  287. Subclass Protocols
  288. GuiMaker Classes
  289. GuiMaker Self-Test
  290. BigGui: A Client Demo Program
  291. ShellGui: GUIs for Command-Line Tools
  292. A Generic Shell-Tools Display
  293. Application-Specific Tool Set Classes
  294. Adding GUI Frontends to Command Lines
  295. GuiStreams: Redirecting Streams to Widgets
  296. Using Redirection for the Packing Scripts
  297. Reloading Callback Handlers Dynamically
  298. Wrapping Up Top-Level Window Interfaces
  299. GUIs, Threads, and Queues
  300. Placing Data on Queues
  301. Placing Callbacks on Queues
  302. More Ways to Add GUIs to Non-GUI Code
  303. Popping Up GUI Windows on Demand
  304. Adding a GUI As a Separate Program: Sockets (A Second Look)
  305. Adding a GUI As a Separate Program: Command Pipes
  306. The PyDemos and PyGadgets Launchers
  307. PyDemos Launcher Bar (Mostly External)
  308. PyGadgets Launcher Bar
  309. 11. Complete GUI Programs
  310. “Python, Open Source, and Camaros”
  311. Examples in Other Chapters
  312. This Chapter’s Strategy
  313. PyEdit: A Text Editor Program/Object
  314. Running PyEdit
  315. PyEdit Changes in Version 2.0 (Third Edition)
  316. PyEdit Changes in Version 2.1 (Fourth Edition)
  317. PyPhoto: An Image Viewer and Resizer
  318. Running PyPhoto
  319. PyPhoto Source Code
  320. PyView: An Image and Notes Slideshow
  321. Running PyView
  322. PyView Source Code
  323. PyDraw: Painting and Moving Graphics
  324. Running PyDraw
  325. PyDraw Source Code
  326. PyClock: An Analog/Digital Clock Widget
  327. A Quick Geometry Lesson
  328. Running PyClock
  329. PyClock Source Code
  330. PyToe: A Tic-Tac-Toe Game Widget
  331. Running PyToe
  332. PyToe Source Code (External)
  333. Where to Go from Here
  334. Part IV. Internet Programming
  335. 12. Network Scripting
  336. “Tune In, Log On, and Drop Out”
  337. Internet Scripting Topics
  338. Running Examples in This Part of the Book
  339. Python Internet Development Options
  340. Plumbing the Internet
  341. The Socket Layer
  342. The Protocol Layer
  343. Python’s Internet Library Modules
  344. Socket Programming
  345. Socket Basics
  346. Running Socket Programs Locally
  347. Running Socket Programs Remotely
  348. Spawning Clients in Parallel
  349. Talking to Reserved Ports
  350. Handling Multiple Clients
  351. Forking Servers
  352. Threading Servers
  353. Standard Library Server Classes
  354. Multiplexing Servers with select
  355. Summary: Choosing a Server Scheme
  356. Making Sockets Look Like Files and Streams
  357. A Stream Redirection Utility
  358. A Simple Python File Server
  359. Running the File Server and Clients
  360. Adding a User-Interface Frontend
  361. 13. Client-Side Scripting
  362. “Socket to Me!”
  363. FTP: Transferring Files over the Net
  364. Transferring Files with ftplib
  365. Using urllib to Download Files
  366. FTP get and put Utilities
  367. Adding a User Interface
  368. Transferring Directories with ftplib
  369. Downloading Site Directories
  370. Uploading Site Directories
  371. Refactoring Uploads and Downloads for Reuse
  372. Transferring Directory Trees with ftplib
  373. Uploading Local Trees
  374. Deleting Remote Trees
  375. Downloading Remote Trees
  376. Processing Internet Email
  377. Unicode in Python 3.X and Email Tools
  378. POP: Fetching Email
  379. Mail Configuration Module
  380. POP Mail Reader Script
  381. Fetching Messages
  382. Fetching Email at the Interactive Prompt
  383. SMTP: Sending Email
  384. SMTP Mail Sender Script
  385. Sending Messages
  386. Sending Email at the Interactive Prompt
  387. email: Parsing and Composing Mail Content
  388. Message Objects
  389. Basic email Package Interfaces in Action
  390. Unicode, Internationalization, and the Python 3.1 email Package
  391. A Console-Based Email Client
  392. Running the pymail Console Client
  393. The mailtools Utility Package
  394. Initialization File
  395. MailTool Class
  396. MailSender Class
  397. MailFetcher Class
  398. MailParser Class
  399. Self-Test Script
  400. Updating the pymail Console Client
  401. NNTP: Accessing Newsgroups
  402. HTTP: Accessing Websites
  403. The urllib Package Revisited
  404. Other urllib Interfaces
  405. Other Client-Side Scripting Options
  406. 14. The PyMailGUI Client
  407. “Use the Source, Luke”
  408. Source Code Modules and Size
  409. Why PyMailGUI?
  410. Running PyMailGUI
  411. Presentation Strategy
  412. Major PyMailGUI Changes
  413. New in Version 2.1 and 2.0 (Third Edition)
  414. New in Version 3.0 (Fourth Edition)
  415. A PyMailGUI Demo
  416. Getting Started
  417. Loading Mail
  418. Threading Model
  419. Load Server Interface
  420. Offline Processing with Save and Open
  421. Sending Email and Attachments
  422. Viewing Email and Attachments
  423. Email Replies and Forwards and Recipient Options
  424. Deleting Email
  425. POP Message Numbers and Synchronization
  426. Handling HTML Content in Email
  427. Mail Content Internationalization Support
  428. Alternative Configurations and Accounts
  429. Multiple Windows and Status Messages
  430. PyMailGUI Implementation
  431. PyMailGUI: The Main Module
  432. SharedNames: Program-Wide Globals
  433. ListWindows: Message List Windows
  434. ViewWindows: Message View Windows
  435. messagecache: Message Cache Manager
  436. popuputil: General-Purpose GUI Pop Ups
  437. wraplines: Line Split Tools
  438. html2text: Extracting Text from HTML (Prototype, Preview)
  439. mailconfig: User Configurations
  440. textConfig: Customizing Pop-Up PyEdit Windows
  441. PyMailGUIHelp: User Help Text and Display
  442. altconfigs: Configuring for Multiple Accounts
  443. Ideas for Improvement
  444. 15. Server-Side Scripting
  445. “Oh, What a Tangled Web We Weave”
  446. What’s a Server-Side CGI Script?
  447. The Script Behind the Curtain
  448. Writing CGI Scripts in Python
  449. Running Server-Side Examples
  450. Web Server Options
  451. Running a Local Web Server
  452. The Server-Side Examples Root Page
  453. Viewing Server-Side Examples and Output
  454. Climbing the CGI Learning Curve
  455. A First Web Page
  456. A First CGI Script
  457. Adding Pictures and Generating Tables
  458. Adding User Interaction
  459. Using Tables to Lay Out Forms
  460. Adding Common Input Devices
  461. Changing Input Layouts
  462. Passing Parameters in Hardcoded URLs
  463. Passing Parameters in Hidden Form Fields
  464. Saving State Information in CGI Scripts
  465. URL Query Parameters
  466. Hidden Form Input Fields
  467. HTTP “Cookies”
  468. Server-Side Databases
  469. Extensions to the CGI Model
  470. Combining Techniques
  471. The Hello World Selector
  472. Checking for Missing and Invalid Inputs
  473. Refactoring Code for Maintainability
  474. Step 1: Sharing Objects Between Pages—A New Input Form
  475. Step 2: A Reusable Form Mock-Up Utility
  476. Step 3: Putting It All Together—A New Reply Script
  477. More on HTML and URL Escapes
  478. URL Escape Code Conventions
  479. Python HTML and URL Escape Tools
  480. Escaping HTML Code
  481. Escaping URLs
  482. Escaping URLs Embedded in HTML Code
  483. Transferring Files to Clients and Servers
  484. Displaying Arbitrary Server Files on the Client
  485. Uploading Client Files to the Server
  486. More Than One Way to Push Bits over the Net
  487. 16. The PyMailCGI Server
  488. “Things to Do When Visiting Chicago”
  489. The PyMailCGI Website
  490. Implementation Overview
  491. New in This Fourth Edition (Version 3.0)
  492. New in the Prior Edition (Version 2.0)
  493. Presentation Overview
  494. Running This Chapter’s Examples
  495. The Root Page
  496. Configuring PyMailCGI
  497. Sending Mail by SMTP
  498. The Message Composition Page
  499. The Send Mail Script
  500. Error Pages
  501. Common Look-and-Feel
  502. Using the Send Mail Script Outside a Browser
  503. Reading POP Email
  504. The POP Password Page
  505. The Mail Selection List Page
  506. Passing State Information in URL Link Parameters
  507. Security Protocols
  508. The Message View Page
  509. Passing State Information in HTML Hidden Input Fields
  510. Escaping Mail Text and Passwords in HTML
  511. Processing Fetched Mail
  512. Reply and Forward
  513. Delete
  514. Deletions and POP Message Numbers
  515. Utility Modules
  516. External Components and Configuration
  517. POP Mail Interface
  518. POP Password Encryption
  519. Common Utilities Module
  520. Web Scripting Trade-Offs
  521. PyMailCGI Versus PyMailGUI
  522. The Web Versus the Desktop
  523. Other Approaches
  524. Part V. Tools and Techniques
  525. 17. Databases and Persistence
  526. “Give Me an Order of Persistence, but Hold the Pickles”
  527. Persistence Options in Python
  528. DBM Files
  529. Using DBM Files
  530. DBM Details: Files, Portability, and Close
  531. Pickled Objects
  532. Using Object Pickling
  533. Pickling in Action
  534. Pickle Details: Protocols, Binary Modes, and _pickle
  535. Shelve Files
  536. Using Shelves
  537. Storing Built-in Object Types in Shelves
  538. Storing Class Instances in Shelves
  539. Changing Classes of Objects Stored in Shelves
  540. Shelve Constraints
  541. Pickled Class Constraints
  542. Other Shelve Limitations
  543. The ZODB Object-Oriented Database
  544. The Mostly Missing ZODB Tutorial
  545. SQL Database Interfaces
  546. SQL Interface Overview
  547. An SQL Database API Tutorial with SQLite
  548. Building Record Dictionaries
  549. Tying the Pieces Together
  550. Loading Database Tables from Files
  551. SQL Utility Scripts
  552. SQL Resources
  553. ORMs: Object Relational Mappers
  554. PyForm: A Persistent Object Viewer (External)
  555. 18. Data Structures
  556. “Roses Are Red, Violets Are Blue; Lists Are Mutable,
  557. and So Is Set Foo”
  558. Implementing Stacks
  559. Built-in Options
  560. A Stack Module
  561. A Stack Class
  562. Customization: Performance Monitors
  563. Optimization: Tuple Tree Stacks
  564. Optimization: In-Place List Modifications
  565. Timing the Improvements
  566. Implementing Sets
  567. Built-in Options
  568. Set Functions
  569. Set Classes
  570. Optimization: Moving Sets to Dictionaries
  571. Adding Relational Algebra to Sets (External)
  572. Subclassing Built-in Types
  573. Binary Search Trees
  574. Built-in Options
  575. Implementing Binary Trees
  576. Trees with Both Keys and Values
  577. Graph Searching
  578. Implementing Graph Search
  579. Moving Graphs to Classes
  580. Permuting Sequences
  581. Reversing and Sorting Sequences
  582. Implementing Reversals
  583. Implementing Sorts
  584. Data Structures Versus Built-ins: The Conclusion
  585. PyTree: A Generic Tree Object Viewer
  586. 19. Text and Language
  587. “See Jack Hack. Hack, Jack, Hack”
  588. Strategies for Processing Text in Python
  589. String Method Utilities
  590. Templating with Replacements and Formats
  591. Parsing with Splits and Joins
  592. Summing Columns in a File
  593. Parsing and Unparsing Rule Strings
  594. Regular Expression Pattern Matching
  595. The re Module
  596. First Examples
  597. String Operations Versus Patterns
  598. Using the re Module
  599. More Pattern Examples
  600. Scanning C Header Files for Patterns
  601. XML and HTML Parsing
  602. XML Parsing in Action
  603. HTML Parsing in Action
  604. Advanced Language Tools
  605. Custom Language Parsers
  606. The Expression Grammar
  607. The Parser’s Code
  608. Adding a Parse Tree Interpreter
  609. Parse Tree Structure
  610. Exploring Parse Trees with the PyTree GUI
  611. Parsers Versus Python
  612. PyCalc: A Calculator Program/Object
  613. A Simple Calculator GUI
  614. PyCalc—A “Real” Calculator GUI
  615. 20. Python/C Integration
  616. “I Am Lost at C”
  617. Extending and Embedding
  618. Extending Python in C: Overview
  619. A Simple C Extension Module
  620. The SWIG Integration Code Generator
  621. A Simple SWIG Example
  622. Wrapping C Environment Calls
  623. Adding Wrapper Classes to Flat Libraries
  624. Wrapping C Environment Calls with SWIG
  625. Wrapping C++ Classes with SWIG
  626. A Simple C++ Extension Class
  627. Wrapping the C++ Class with SWIG
  628. Using the C++ Class in Python
  629. Other Extending Tools
  630. Embedding Python in C: Overview
  631. The C Embedding API
  632. What Is Embedded Code?
  633. Basic Embedding Techniques
  634. Running Simple Code Strings
  635. Running Code Strings with Results and Namespaces
  636. Calling Python Objects
  637. Running Strings in Dictionaries
  638. Precompiling Strings to Bytecode
  639. Registering Callback Handler Objects
  640. Registration Implementation
  641. Using Python Classes in C
  642. Other Integration Topics
  643. Part VI. The End
  644. 21. Conclusion: Python and the Development Cycle
  645. “That’s the End of the Book, Now Here’s the Meaning of Life”
  646. “Something’s Wrong with the Way We Program Computers”
  647. The “Gilligan Factor”
  648. Doing the Right Thing
  649. The Static Language Build Cycle
  650. Artificial Complexities
  651. One Language Does Not Fit All
  652. Enter Python
  653. But What About That Bottleneck?
  654. Python Provides Immediate Turnaround
  655. Python Is “Executable Pseudocode”
  656. Python Is OOP Done Right
  657. Python Fosters Hybrid Applications
  658. On Sinking the Titanic
  659. So What’s “Python: The Sequel”?
  660. In the Final Analysis…
  661. Index
书名:Python编程(第四版,影印版,上下卷)
作者:Mark Lutz
国内出版社:东南大学出版社
出版时间:2011年06月
页数:1584
书号:978-7-5641-2687-2
原版书书名:Programming Python, Fourth Edition
原版书出版商:O'Reilly Media
Mark Lutz
 
作为全球Python培训界的领军人物。Mark Lutz是Python最畅销书籍的作者,也是Python社区的先驱。
Mark 是O’Reilly出版的《Programming Python》和《Python Pocket Reference》的作者,这两本书于2009年都已经出版了第3版。Mark自1992年开始接触Python,1995年开始撰写有关Python的书籍,从1997年开始教授Python课程。截止到2009年,他已经开办了225个Python短期培训课程,教授了大约3500名学习者,销售了大约25万册有关Python的书籍。许多书被翻译成十多种语言。
此外,Mark拥有威斯康星大学计算机科学学士和硕士学位,在过去的25年中,他主要从事编译器、编程工具、脚本程序以及各种客户端/服务器系统方面的工作。你也可以通过访问http://www.rmi.net/~lutz与他取得联系。
 
 
The animal on the cover of Programming Python is an African rock python, one of
approximately 18 species of python. Pythons are nonvenomous constrictor snakes that
live in tropical regions of Africa, Asia, Australia, and some Pacific Islands. Pythons live
mainly on the ground, but they are also excellent swimmers and climbers. Both male
and female pythons retain vestiges of their ancestral hind legs. The male python uses
these vestiges, or spurs, when courting a female.
The python kills its prey by suffocation. While the snake’s sharp teeth grip and hold
the prey in place, the python’s long body coils around its victim’s chest, constricting
tighter each time it breathes out. Pythons feed primarily on mammals and birds. Python
attacks on humans are extremely rare.
购买选项
定价:148.00元
书号:978-7-5641-2687-2
出版社:东南大学出版社