Python編程(第四版,影印版,上下卷)
出版時(shí)間:2011年06月
頁(yè)數(shù):1584
在你掌握Python的基本原理之后,你會(huì)如何應(yīng)用它呢?本書(shū)針對(duì)該語(yǔ)言的主要應(yīng)用領(lǐng)域——系統(tǒng)管理、GUI和Web——做了深入講解,并且探索了它在數(shù)據(jù)庫(kù)、網(wǎng)絡(luò)、前端腳本撰寫(xiě)層、文本處理和更多方面的使用。通過(guò)重點(diǎn)關(guān)注常用工具和庫(kù),你將會(huì)對(duì)Python在實(shí)際現(xiàn)實(shí)世界里的編程有更深的理解。
你將通過(guò)一種清晰和簡(jiǎn)潔的方式——講解大量正確用法和常見(jiàn)慣例的例子——學(xué)會(huì)語(yǔ)言的語(yǔ)法和編程技巧?!禤ython編程》針對(duì)3.x版本做了完全的更新,它探討了Python如何成為軟件開(kāi)發(fā)工具,并且特別為此設(shè)計(jì)了很多代碼示例。
內(nèi)容包括:
· Python快速入門(mén):搭建一個(gè)簡(jiǎn)單的例子,包括數(shù)據(jù)表示、面向?qū)ο缶幊?、?duì)象持久化、GUI和網(wǎng)站基礎(chǔ)
· 系統(tǒng)編程:針對(duì)命令行腳本編寫(xiě)、處理文件和文件夾、并行運(yùn)行程序等需求探索系統(tǒng)接口工具和技術(shù)
· GUI編程:學(xué)習(xí)使用Python tkinter組件庫(kù)來(lái)創(chuàng)建完整的用戶(hù)界面
· 互聯(lián)網(wǎng)編程:訪問(wèn)客戶(hù)端網(wǎng)絡(luò)協(xié)議和電子郵件工具,使用CGI腳本,以及學(xué)習(xí)網(wǎng)站搭建技術(shù)
· 更多應(yīng)用Python的地方:實(shí)現(xiàn)數(shù)據(jù)結(jié)構(gòu),分析基于文本的信息,訪問(wèn)數(shù)據(jù)庫(kù),以及擴(kuò)展和嵌入Python
“這些章節(jié)提供了從問(wèn)題調(diào)查到設(shè)計(jì)規(guī)范等各個(gè)方面的內(nèi)容,它著重于現(xiàn)實(shí)問(wèn)題并且避開(kāi)常見(jiàn)的障礙。”
——Diane Donovan
California Bookwatch
Mark Lutz是Python培訓(xùn)的世界領(lǐng)先者,他是最早和最暢銷(xiāo)Python著作的作者,從1992年起就是Python社區(qū)的先鋒人物。Mark有25年的軟件開(kāi)發(fā)經(jīng)驗(yàn)而且是《Python編程》前一版的作者,也是O’Reilly的
《Learning Python and Python Pocket Reference》的作者。
適用于有編程經(jīng)驗(yàn)的讀者
- Preface
- Part I. The Beginning
- 1. A Sneak Preview
- “Programming Python: The Short Story”
- The Task
- Step 1: Representing Records
- Using Lists
- Using Dictionaries
- Step 2: Storing Records Persistently
- Using Formatted Files
- Using Pickle Files
- Using Per-Record Pickle Files
- Using Shelves
- Step 3: Stepping Up to OOP
- Using Classes
- Adding Behavior
- Adding Inheritance
- Refactoring Code
- Adding Persistence
- Other Database Options
- Step 4: Adding Console Interaction
- A Console Shelve Interface
- Step 5: Adding a GUI
- GUI Basics
- Using OOP for GUIs
- Getting Input from a User
- A GUI Shelve Interface
- Step 6: Adding a Web Interface
- CGI Basics
- Running a Web Server
- Using Query Strings and urllib
- Formatting Reply Text
- A Web-Based Shelve Interface
- The End of the Demo
- Part II. System Programming
- 2. System Tools
- “The os.path to Knowledge”
- Why Python Here?
- The Next Five Chapters
- System Scripting Overview
- Python System Modules
- Module Documentation Sources
- Paging Documentation Strings
- A Custom Paging Script
- String Method Basics
- Other String Concepts in Python 3.X: Unicode and bytes
- File Operation Basics
- Using Programs in Two Ways
- Python Library Manuals
- Commercially Published References
- Introducing the sys Module
- Platforms and Versions
- The Module Search Path
- The Loaded Modules Table
- Exception Details
- Other sys Module Exports
- Introducing the os Module
- Tools in the os Module
- Administrative Tools
- Portability Constants
- Common os.path Tools
- Running Shell Commands from Scripts
- Other os Module Exports
- 3. Script Execution Context
- “I’d Like to Have an Argument, Please”
- Current Working Directory
- CWD, Files, and Import Paths
- CWD and Command Lines
- Command-Line Arguments
- Parsing Command-Line Arguments
- Shell Environment Variables
- Fetching Shell Variables
- Changing Shell Variables
- Shell Variable Fine Points: Parents, putenv, and getenv
- Standard Streams
- Redirecting Streams to Files and Programs
- Redirected Streams and User Interaction
- Redirecting Streams to Python Objects
- The io.StringIO and io.BytesIO Utility Classes
- Capturing the stderr Stream
- Redirection Syntax in Print Calls
- Other Redirection Options: os.popen and subprocess Revisited
- 4. File and Directory Tools
- “Erase Your Hard Drive in Five Easy Steps!”
- File Tools
- The File Object Model in Python 3.X
- Using Built-in File Objects
- Binary and Text Files
- Lower-Level File Tools in the os Module
- File Scanners
- Directory Tools
- Walking One Directory
- Walking Directory Trees
- Handling Unicode Filenames in 3.X: listdir, walk, glob
- 5. Parallel System Tools
- “Telling the Monkeys What to Do”
- Forking Processes
- The fork/exec Combination
- Threads
- The _thread Module
- The threading Module
- The queue Module
- Preview: GUIs and Threads
- More on the Global Interpreter Lock
- Program Exits
- sys Module Exits
- os Module Exits
- Shell Command Exit Status Codes
- Process Exit Status and Shared State
- Thread Exits and Shared State
- Interprocess Communication
- Anonymous Pipes
- Named Pipes (Fifos)
- Sockets: A First Look
- Signals
- The multiprocessing Module
- Why multiprocessing?
- The Basics: Processes and Locks
- IPC Tools: Pipes, Shared Memory, and Queues
- Starting Independent Programs
- And Much More
- Why multiprocessing? The Conclusion
- Other Ways to Start Programs
- The os.spawn Calls
- The os.startfile call on Windows
- A Portable Program-Launch Framework
- Other System Tools Coverage
- 6. Complete System Programs
- “The Greps of Wrath”
- A Quick Game of “Find the Biggest Python File”
- Scanning the Standard Library Directory
- Scanning the Standard Library Tree
- Scanning the Module Search Path
- Scanning the Entire Machine
- Printing Unicode Filenames
- Splitting and Joining Files
- Splitting Files Portably
- Joining Files Portably
- Usage Variations
- Generating Redirection Web Pages
- Page Template File
- Page Generator Script
- A Regression Test Script
- Running the Test Driver
- Copying Directory Trees
- Comparing Directory Trees
- Finding Directory Differences
- Finding Tree Differences
- Running the Script
- Verifying Backups
- Reporting Differences and Other Ideas
- Searching Directory Trees
- Greps and Globs and Finds
- Rolling Your Own find Module
- Cleaning Up Bytecode Files
- A Python Tree Searcher
- Visitor: Walking Directories “++”
- Editing Files in Directory Trees (Visitor)
- Global Replacements in Directory Trees (Visitor)
- Counting Source Code Lines (Visitor)
- Recoding Copies with Classes (Visitor)
- Other Visitor Examples (External)
- Playing Media Files
- The Python webbrowser Module
- The Python mimetypes Module
- Running the Script
- Automated Program Launchers (External)
- Part III. GUI Programming
- 7. Graphical User Interfaces
- “Here’s Looking at You, Kid”
- GUI Programming Topics
- Running the Examples
- Python GUI Development Options
- tkinter Overview
- tkinter Pragmatics
- tkinter Documentation
- tkinter Extensions
- tkinter Structure
- Climbing the GUI Learning Curve
- “Hello World” in Four Lines (or Less)
- tkinter Coding Basics
- Making Widgets
- Geometry Managers
- Running GUI Programs
- tkinter Coding Alternatives
- Widget Resizing Basics
- Configuring Widget Options and Window Titles
- One More for Old Times’ Sake
- Packing Widgets Without Saving Them
- Adding Buttons and Callbacks
- Widget Resizing Revisited: Expansion
- Adding User-Defined Callback Handlers
- Lambda Callback Handlers
- Deferring Calls with Lambdas and Object References
- Callback Scope Issues
- Bound Method Callback Handlers
- Callable Class Object Callback Handlers
- Other tkinter Callback Protocols
- Binding Events
- Adding Multiple Widgets
- Widget Resizing Revisited: Clipping
- Attaching Widgets to Frames
- Layout: Packing Order and Side Attachments
- The Packer’s Expand and Fill Revisited
- Using Anchor to Position Instead of Stretch
- Customizing Widgets with Classes
- Standardizing Behavior and Appearance
- Reusable GUI Components with Classes
- Attaching Class Components
- Extending Class Components
- Standalone Container Classes
- The End of the Tutorial
- Python/tkinter for Tcl/Tk Converts
- 8. A tkinter Tour, Part
- “Widgets and Gadgets and GUIs, Oh My!”
- This Chapter’s Topics
- Configuring Widget Appearance
- Top-Level Windows
- Toplevel and Tk Widgets
- Top-Level Window Protocols
- Dialogs
- Standard (Common) Dialogs
- The Old-Style Dialog Module
- Custom Dialogs
- Binding Events
- Other bind Events
- Message and Entry
- Message
- Entry
- Laying Out Input Forms
- tkinter “Variables” and Form Layout Alternatives
- Checkbutton, Radiobutton, and Scale
- Checkbuttons
- Radio Buttons
- Scales (Sliders)
- Running GUI Code Three Ways
- Attaching Frames
- Independent Windows
- Running Programs
- Images
- Fun with Buttons and Pictures
- Viewing and Processing Images with PIL
- PIL Basics
- Displaying Other Image Types with PIL
- Creating Image Thumbnails with PIL
- 9. A tkinter Tour, Part 2
- “On Today’s Menu: Spam, Spam, and Spam”
- Menus
- Top-Level Window Menus
- Frame- and Menubutton-Based Menus
- Windows with Both Menus and Toolbars
- Listboxes and Scrollbars
- Programming Listboxes
- Programming Scroll Bars
- Packing Scroll Bars
- Text
- Programming the Text Widget
- Adding Text-Editing Operations
- Unicode and the Text Widget
- Advanced Text and Tag Operations
- Canvas
- Basic Canvas Operations
- Programming the Canvas Widget
- Scrolling Canvases
- Scrollable Canvases and Image Thumbnails
- Using Canvas Events
- Grids
- Why Grids?
- Grid Basics: Input Forms Revisited
- Comparing grid and pack
- Combining grid and pack
- Making Gridded Widgets Expandable
- Laying Out Larger Tables with grid
- Time Tools, Threads, and Animation
- Using Threads with tkinter GUIs
- Using the after Method
- Simple Animation Techniques
- Other Animation Topics
- The End of the Tour
- Other Widgets and Options
- 10. GUI Coding Techniques
- “Building a Better Mousetrap”
- GuiMixin: Common Tool Mixin Classes
- Widget Builder Functions
- Mixin Utility Classes
- GuiMaker: Automating Menus and Toolbars
- Subclass Protocols
- GuiMaker Classes
- GuiMaker Self-Test
- BigGui: A Client Demo Program
- ShellGui: GUIs for Command-Line Tools
- A Generic Shell-Tools Display
- Application-Specific Tool Set Classes
- Adding GUI Frontends to Command Lines
- GuiStreams: Redirecting Streams to Widgets
- Using Redirection for the Packing Scripts
- Reloading Callback Handlers Dynamically
- Wrapping Up Top-Level Window Interfaces
- GUIs, Threads, and Queues
- Placing Data on Queues
- Placing Callbacks on Queues
- More Ways to Add GUIs to Non-GUI Code
- Popping Up GUI Windows on Demand
- Adding a GUI As a Separate Program: Sockets (A Second Look)
- Adding a GUI As a Separate Program: Command Pipes
- The PyDemos and PyGadgets Launchers
- PyDemos Launcher Bar (Mostly External)
- PyGadgets Launcher Bar
- 11. Complete GUI Programs
- “Python, Open Source, and Camaros”
- Examples in Other Chapters
- This Chapter’s Strategy
- PyEdit: A Text Editor Program/Object
- Running PyEdit
- PyEdit Changes in Version 2.0 (Third Edition)
- PyEdit Changes in Version 2.1 (Fourth Edition)
- PyPhoto: An Image Viewer and Resizer
- Running PyPhoto
- PyPhoto Source Code
- PyView: An Image and Notes Slideshow
- Running PyView
- PyView Source Code
- PyDraw: Painting and Moving Graphics
- Running PyDraw
- PyDraw Source Code
- PyClock: An Analog/Digital Clock Widget
- A Quick Geometry Lesson
- Running PyClock
- PyClock Source Code
- PyToe: A Tic-Tac-Toe Game Widget
- Running PyToe
- PyToe Source Code (External)
- Where to Go from Here
- Part IV. Internet Programming
- 12. Network Scripting
- “Tune In, Log On, and Drop Out”
- Internet Scripting Topics
- Running Examples in This Part of the Book
- Python Internet Development Options
- Plumbing the Internet
- The Socket Layer
- The Protocol Layer
- Python’s Internet Library Modules
- Socket Programming
- Socket Basics
- Running Socket Programs Locally
- Running Socket Programs Remotely
- Spawning Clients in Parallel
- Talking to Reserved Ports
- Handling Multiple Clients
- Forking Servers
- Threading Servers
- Standard Library Server Classes
- Multiplexing Servers with select
- Summary: Choosing a Server Scheme
- Making Sockets Look Like Files and Streams
- A Stream Redirection Utility
- A Simple Python File Server
- Running the File Server and Clients
- Adding a User-Interface Frontend
- 13. Client-Side Scripting
- “Socket to Me!”
- FTP: Transferring Files over the Net
- Transferring Files with ftplib
- Using urllib to Download Files
- FTP get and put Utilities
- Adding a User Interface
- Transferring Directories with ftplib
- Downloading Site Directories
- Uploading Site Directories
- Refactoring Uploads and Downloads for Reuse
- Transferring Directory Trees with ftplib
- Uploading Local Trees
- Deleting Remote Trees
- Downloading Remote Trees
- Processing Internet Email
- Unicode in Python 3.X and Email Tools
- POP: Fetching Email
- Mail Configuration Module
- POP Mail Reader Script
- Fetching Messages
- Fetching Email at the Interactive Prompt
- SMTP: Sending Email
- SMTP Mail Sender Script
- Sending Messages
- Sending Email at the Interactive Prompt
- email: Parsing and Composing Mail Content
- Message Objects
- Basic email Package Interfaces in Action
- Unicode, Internationalization, and the Python 3.1 email Package
- A Console-Based Email Client
- Running the pymail Console Client
- The mailtools Utility Package
- Initialization File
- MailTool Class
- MailSender Class
- MailFetcher Class
- MailParser Class
- Self-Test Script
- Updating the pymail Console Client
- NNTP: Accessing Newsgroups
- HTTP: Accessing Websites
- The urllib Package Revisited
- Other urllib Interfaces
- Other Client-Side Scripting Options
- 14. The PyMailGUI Client
- “Use the Source, Luke”
- Source Code Modules and Size
- Why PyMailGUI?
- Running PyMailGUI
- Presentation Strategy
- Major PyMailGUI Changes
- New in Version 2.1 and 2.0 (Third Edition)
- New in Version 3.0 (Fourth Edition)
- A PyMailGUI Demo
- Getting Started
- Loading Mail
- Threading Model
- Load Server Interface
- Offline Processing with Save and Open
- Sending Email and Attachments
- Viewing Email and Attachments
- Email Replies and Forwards and Recipient Options
- Deleting Email
- POP Message Numbers and Synchronization
- Handling HTML Content in Email
- Mail Content Internationalization Support
- Alternative Configurations and Accounts
- Multiple Windows and Status Messages
- PyMailGUI Implementation
- PyMailGUI: The Main Module
- SharedNames: Program-Wide Globals
- ListWindows: Message List Windows
- ViewWindows: Message View Windows
- messagecache: Message Cache Manager
- popuputil: General-Purpose GUI Pop Ups
- wraplines: Line Split Tools
- html2text: Extracting Text from HTML (Prototype, Preview)
- mailconfig: User Configurations
- textConfig: Customizing Pop-Up PyEdit Windows
- PyMailGUIHelp: User Help Text and Display
- altconfigs: Configuring for Multiple Accounts
- Ideas for Improvement
- 15. Server-Side Scripting
- “Oh, What a Tangled Web We Weave”
- What’s a Server-Side CGI Script?
- The Script Behind the Curtain
- Writing CGI Scripts in Python
- Running Server-Side Examples
- Web Server Options
- Running a Local Web Server
- The Server-Side Examples Root Page
- Viewing Server-Side Examples and Output
- Climbing the CGI Learning Curve
- A First Web Page
- A First CGI Script
- Adding Pictures and Generating Tables
- Adding User Interaction
- Using Tables to Lay Out Forms
- Adding Common Input Devices
- Changing Input Layouts
- Passing Parameters in Hardcoded URLs
- Passing Parameters in Hidden Form Fields
- Saving State Information in CGI Scripts
- URL Query Parameters
- Hidden Form Input Fields
- HTTP “Cookies”
- Server-Side Databases
- Extensions to the CGI Model
- Combining Techniques
- The Hello World Selector
- Checking for Missing and Invalid Inputs
- Refactoring Code for Maintainability
- Step 1: Sharing Objects Between Pages—A New Input Form
- Step 2: A Reusable Form Mock-Up Utility
- Step 3: Putting It All Together—A New Reply Script
- More on HTML and URL Escapes
- URL Escape Code Conventions
- Python HTML and URL Escape Tools
- Escaping HTML Code
- Escaping URLs
- Escaping URLs Embedded in HTML Code
- Transferring Files to Clients and Servers
- Displaying Arbitrary Server Files on the Client
- Uploading Client Files to the Server
- More Than One Way to Push Bits over the Net
- 16. The PyMailCGI Server
- “Things to Do When Visiting Chicago”
- The PyMailCGI Website
- Implementation Overview
- New in This Fourth Edition (Version 3.0)
- New in the Prior Edition (Version 2.0)
- Presentation Overview
- Running This Chapter’s Examples
- The Root Page
- Configuring PyMailCGI
- Sending Mail by SMTP
- The Message Composition Page
- The Send Mail Script
- Error Pages
- Common Look-and-Feel
- Using the Send Mail Script Outside a Browser
- Reading POP Email
- The POP Password Page
- The Mail Selection List Page
- Passing State Information in URL Link Parameters
- Security Protocols
- The Message View Page
- Passing State Information in HTML Hidden Input Fields
- Escaping Mail Text and Passwords in HTML
- Processing Fetched Mail
- Reply and Forward
- Delete
- Deletions and POP Message Numbers
- Utility Modules
- External Components and Configuration
- POP Mail Interface
- POP Password Encryption
- Common Utilities Module
- Web Scripting Trade-Offs
- PyMailCGI Versus PyMailGUI
- The Web Versus the Desktop
- Other Approaches
- Part V. Tools and Techniques
- 17. Databases and Persistence
- “Give Me an Order of Persistence, but Hold the Pickles”
- Persistence Options in Python
- DBM Files
- Using DBM Files
- DBM Details: Files, Portability, and Close
- Pickled Objects
- Using Object Pickling
- Pickling in Action
- Pickle Details: Protocols, Binary Modes, and _pickle
- Shelve Files
- Using Shelves
- Storing Built-in Object Types in Shelves
- Storing Class Instances in Shelves
- Changing Classes of Objects Stored in Shelves
- Shelve Constraints
- Pickled Class Constraints
- Other Shelve Limitations
- The ZODB Object-Oriented Database
- The Mostly Missing ZODB Tutorial
- SQL Database Interfaces
- SQL Interface Overview
- An SQL Database API Tutorial with SQLite
- Building Record Dictionaries
- Tying the Pieces Together
- Loading Database Tables from Files
- SQL Utility Scripts
- SQL Resources
- ORMs: Object Relational Mappers
- PyForm: A Persistent Object Viewer (External)
- 18. Data Structures
- “Roses Are Red, Violets Are Blue; Lists Are Mutable,
- and So Is Set Foo”
- Implementing Stacks
- Built-in Options
- A Stack Module
- A Stack Class
- Customization: Performance Monitors
- Optimization: Tuple Tree Stacks
- Optimization: In-Place List Modifications
- Timing the Improvements
- Implementing Sets
- Built-in Options
- Set Functions
- Set Classes
- Optimization: Moving Sets to Dictionaries
- Adding Relational Algebra to Sets (External)
- Subclassing Built-in Types
- Binary Search Trees
- Built-in Options
- Implementing Binary Trees
- Trees with Both Keys and Values
- Graph Searching
- Implementing Graph Search
- Moving Graphs to Classes
- Permuting Sequences
- Reversing and Sorting Sequences
- Implementing Reversals
- Implementing Sorts
- Data Structures Versus Built-ins: The Conclusion
- PyTree: A Generic Tree Object Viewer
- 19. Text and Language
- “See Jack Hack. Hack, Jack, Hack”
- Strategies for Processing Text in Python
- String Method Utilities
- Templating with Replacements and Formats
- Parsing with Splits and Joins
- Summing Columns in a File
- Parsing and Unparsing Rule Strings
- Regular Expression Pattern Matching
- The re Module
- First Examples
- String Operations Versus Patterns
- Using the re Module
- More Pattern Examples
- Scanning C Header Files for Patterns
- XML and HTML Parsing
- XML Parsing in Action
- HTML Parsing in Action
- Advanced Language Tools
- Custom Language Parsers
- The Expression Grammar
- The Parser’s Code
- Adding a Parse Tree Interpreter
- Parse Tree Structure
- Exploring Parse Trees with the PyTree GUI
- Parsers Versus Python
- PyCalc: A Calculator Program/Object
- A Simple Calculator GUI
- PyCalc—A “Real” Calculator GUI
- 20. Python/C Integration
- “I Am Lost at C”
- Extending and Embedding
- Extending Python in C: Overview
- A Simple C Extension Module
- The SWIG Integration Code Generator
- A Simple SWIG Example
- Wrapping C Environment Calls
- Adding Wrapper Classes to Flat Libraries
- Wrapping C Environment Calls with SWIG
- Wrapping C++ Classes with SWIG
- A Simple C++ Extension Class
- Wrapping the C++ Class with SWIG
- Using the C++ Class in Python
- Other Extending Tools
- Embedding Python in C: Overview
- The C Embedding API
- What Is Embedded Code?
- Basic Embedding Techniques
- Running Simple Code Strings
- Running Code Strings with Results and Namespaces
- Calling Python Objects
- Running Strings in Dictionaries
- Precompiling Strings to Bytecode
- Registering Callback Handler Objects
- Registration Implementation
- Using Python Classes in C
- Other Integration Topics
- Part VI. The End
- 21. Conclusion: Python and the Development Cycle
- “That’s the End of the Book, Now Here’s the Meaning of Life”
- “Something’s Wrong with the Way We Program Computers”
- The “Gilligan Factor”
- Doing the Right Thing
- The Static Language Build Cycle
- Artificial Complexities
- One Language Does Not Fit All
- Enter Python
- But What About That Bottleneck?
- Python Provides Immediate Turnaround
- Python Is “Executable Pseudocode”
- Python Is OOP Done Right
- Python Fosters Hybrid Applications
- On Sinking the Titanic
- So What’s “Python: The Sequel”?
- In the Final Analysis…
- Index
書(shū)名:Python編程(第四版,影印版,上下卷)
國(guó)內(nèi)出版社:東南大學(xué)出版社
出版時(shí)間:2011年06月
頁(yè)數(shù):1584
書(shū)號(hào):978-7-5641-2687-2
原版書(shū)書(shū)名:Programming Python, Fourth Edition
原版書(shū)出版商:O'Reilly Media
Mark Lutz
作為全球Python培訓(xùn)界的領(lǐng)軍人物。Mark Lutz是Python最暢銷(xiāo)書(shū)籍的作者,也是Python社區(qū)的先驅(qū)。
Mark 是O’Reilly出版的《Programming Python》和《Python Pocket Reference》的作者,這兩本書(shū)于2009年都已經(jīng)出版了第3版。Mark自1992年開(kāi)始接觸Python,1995年開(kāi)始撰寫(xiě)有關(guān)Python的書(shū)籍,從1997年開(kāi)始教授Python課程。截止到2009年,他已經(jīng)開(kāi)辦了225個(gè)Python短期培訓(xùn)課程,教授了大約3500名學(xué)習(xí)者,銷(xiāo)售了大約25萬(wàn)冊(cè)有關(guān)Python的書(shū)籍。許多書(shū)被翻譯成十多種語(yǔ)言。
此外,Mark擁有威斯康星大學(xué)計(jì)算機(jī)科學(xué)學(xué)士和碩士學(xué)位,在過(guò)去的25年中,他主要從事編譯器、編程工具、腳本程序以及各種客戶(hù)端/服務(wù)器系統(tǒng)方面的工作。你也可以通過(guò)訪問(wèn)http://www.rmi.net/~lutz與他取得聯(lián)系。
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.