وبلاگ بلیان

Python Developer's Handbook (Developer's Library)

معرفی کتاب «Python Developer's Handbook (Developer's Library)» نوشتهٔ Lessa, André dos Santos، منتشرشده توسط نشر Sams Pearson Education [distributor در سال 2000. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است. «Python Developer's Handbook (Developer's Library)» در دستهٔ بدون دسته‌بندی قرار دارد.

Annotation The Python Developer's Handbook is designed to expose experienced developers to Python and its uses. Beginning with a brief introduction to the language and its syntax, the book moves quickly into more advanced programming topics, including embedding Python, network programming, GUI toolkits, JPython, Web development, Python/C API, and more. Python is an interpreted, object-oriented programming language. Its syntax is simple and easy to learn, and it encourages programmers to write and think clearly. The Python Developer's Handbook is carefully written, well-organized introduction to this powerful, fast-growing programming language for experienced developers Python Developer's Handbook......Page 2 Copyright © 2001 by Sams Publishing......Page 3 Contents at a Glance......Page 4 Table of Contents......Page 6 About the Author......Page 27 INTRODUCTION......Page 30 PART I Basic Programming......Page 34 Introduction to Python......Page 36 Why Use Python?......Page 39 Main Technical Features......Page 42 Python Distribution......Page 45 Installing and Configuring Python......Page 47 Python and Other Languages......Page 51 Patches and Bugs List......Page 54 PSA and the Python Consortium......Page 55 Summary......Page 57 Language Review......Page 60 The Shell Environment......Page 61 Programs......Page 64 Operators......Page 76 Expressions......Page 78 Control Statements......Page 88 Data Structures......Page 91 Functions and Procedures......Page 100 Modules and Packages......Page 106 Input and Output......Page 111 File Handling......Page 115 Summary......Page 118 Code Example......Page 119 Python Libraries......Page 126 Python Services......Page 128 The String Group......Page 139 Miscellaneous......Page 144 Generic Operational System......Page 148 Optional Operational System......Page 156 Debugger......Page 159 Internet Protocol and Support......Page 160 Internet Data Handling......Page 163 Multimedia......Page 166 Cryptographic......Page 168 UNIX Specific......Page 169 SGI IRIX Specific......Page 172 Macintosh Specific......Page 174 Undocumented Modules......Page 175 Summary......Page 179 Exception Handling......Page 182 Standard Exceptions (Getting Help from Other Modules)......Page 186 Raising Exceptions......Page 188 Catching Exceptions......Page 194 try/finally......Page 196 Creating User-defined Exceptions......Page 197 The Standard Exception Hierarchy......Page 198 Summary......Page 202 Code Examples......Page 203 Object-Oriented Programming......Page 208 An Introduction to Python OOP......Page 209 Python Classes and Instances......Page 212 Methods Handling......Page 219 Special Methods......Page 221 Inheritance......Page 227 Polymorphism......Page 230 Encapsulation......Page 233 Metaclasses......Page 235 Summary......Page 238 Code Examples......Page 240 PART II Advanced Programming......Page 248 Extending and Embedding Python......Page 250 Extending......Page 252 Compiling and Linking Extension Modules......Page 266 SWIG—The Simple Wrapper Interface Generator......Page 272 Other Wrappers......Page 274 Embedding......Page 275 Summary......Page 280 Code Examples......Page 281 Object Interfacing and Distribution......Page 288 Interfacing Objects......Page 289 Introduction to COM Objects......Page 290 Implementing COM Objects in Python......Page 295 Distributing Objects with Python......Page 314 Summary......Page 324 Code Examples......Page 326 Working with Databases......Page 334 Flat Databases......Page 335 DBM (Database Managers) Databases......Page 338 Object Serialization and Persistent Storage......Page 344 The ODBC Module......Page 351 ADO (ActiveX Data Objects)......Page 354 Using SQL......Page 356 Python DB API......Page 364 Summary......Page 377 Other Advanced Topics......Page 380 Manipulating Images......Page 381 Working with Sounds......Page 384 Restricted Execution Mode......Page 389 Scientific Computing......Page 392 Regular Expressions......Page 398 Threads......Page 405 Summary......Page 411 Code Examples......Page 412 PART III Network Programming......Page 418 Networking......Page 420 Networking Concepts......Page 421 HTTP......Page 434 Accessing URLs......Page 443 FTP......Page 446 SMTP/POP3/IMAP......Page 447 Newsgroups—Telnet and Gopher......Page 450 Summary......Page 452 Web Development......Page 456 Configuring Web Servers for Python/CGI Scripts......Page 457 Third-Party Internet Applications......Page 462 Other Applications......Page 468 Site Management Tools......Page 471 Summary......Page 476 Web Programming......Page 480 An Introduction to CGI......Page 481 The cgi Module......Page 483 Creating, Installing, and Running Your Script......Page 485 Python Active Scripting......Page 510 Summary......Page 517 Parsing and Manipulating Data......Page 520 XML Processing......Page 521 XML-RPC......Page 539 XDR Data Exchange Format......Page 541 Handling Other Markup Languages......Page 546 MIME Parsing and Manipulation......Page 559 Generic Conversion Functions......Page 573 Summary......Page 578 PART IV Graphical Interfaces......Page 582 Python GUI Toolkits......Page 584 The Tkinter Module......Page 586 Overview of Other GUI Modules......Page 587 Designing a Good Interface......Page 600 Summary......Page 601 Introduction to Tcl/Tk......Page 604 Tkinter......Page 605 Geometry Management......Page 609 Handling Tkinter Events......Page 614 Tkinter Widgets......Page 619 Designing Applications......Page 653 Tkinter Resources......Page 659 Summary......Page 660 PART V Developing with Python......Page 662 Building Python Applications......Page 664 Development Strategy......Page 665 IDLE......Page 676 Pythonwin......Page 690 Summary......Page 700 The Development Process of Python Programs......Page 702 Compiling Python......Page 703 Editing Code......Page 707 Python Scripts......Page 710 Generating an Executable Python Bytecode......Page 714 Interpreter......Page 715 Debugging the Application......Page 718 Profiling Python......Page 726 Distributing Python Applications......Page 737 Summary......Page 741 PART VI Python and Java......Page 744 Welcome to JPython......Page 746 Java Integration......Page 751 Downloading and Installing JPython......Page 752 The Interpreter......Page 756 The JPython Registry......Page 758 Creating Graphical Interfaces......Page 760 Embedding......Page 761 jpythonc......Page 763 Running JPython Applets......Page 765 Summary......Page 766 PART VII Appendixes......Page 768 Python/C API......Page 770 The Very High Level Layer......Page 780 Reference Counting......Page 782 Exception Handling......Page 783 Standard Exceptions......Page 786 Utilities......Page 788 Abstract Objects Layer......Page 791 Concrete Objects Layer......Page 800 Initialization, Finalization, and Threads......Page 818 Memory Management......Page 829 Defining New Object Types......Page 833 Python on Win32 Systems......Page 836 Python on MacOS Systems......Page 839 Python on UNIX Systems......Page 843 Other Platforms......Page 844 Python 2.0 License Information......Page 846 Python’s Copyright Notice (version 1.6)......Page 848 Python’s Copyright Notice (until version 1.5.2)......Page 850 Copyright Notice of JPython with OROMatcher......Page 851 Copyright Notice of JPython without OROMatcher......Page 853 APPENDIX D Migrating to Python 2.0......Page 856 Enhancements......Page 857 Expected Code Breaking......Page 860 Index......Page 862 Python Developer's Handbook 2 Copyright © 2001 by Sams Publishing 3 Contents at a Glance 4 Table of Contents 6 About the Author 27 INTRODUCTION 30 PART I Basic Programming 34 CHAPTER 1 Introduction 36 Introduction to Python 36 Why Use Python? 39 Main Technical Features 42 Python Distribution 45 Installing and Configuring Python 47 Python and Other Languages 51 Patches and Bugs List 54 PSA and the Python Consortium 55 Summary 57 CHAPTER 2 Language Review 60 Language Review 60 The Shell Environment 61 Programs 64 Operators 76 Expressions 78 Control Statements 88 Data Structures 91 Functions and Procedures 100 Modules and Packages 106 Input and Output 111 File Handling 115 Summary 118 Code Example 119 CHAPTER 3 Python Libraries 126 Python Libraries 126 Python Services 128 The String Group 139 Miscellaneous 144 Generic Operational System 148 Optional Operational System 156 Debugger 159 Profiler 160 Internet Protocol and Support 160 Internet Data Handling 163 Restricted Execution 166 Multimedia 166 Cryptographic 168 UNIX Specific 169 SGI IRIX Specific 172 Sun OS Specific 174 MS Windows Specific 174 Macintosh Specific 174 Undocumented Modules 175 Summary 179 CHAPTER 4 Exception Handling 182 Exception Handling 182 Standard Exceptions (Getting Help from Other Modules) 186 Raising Exceptions 188 Catching Exceptions 194 try/finally 196 Creating User-defined Exceptions 197 The Standard Exception Hierarchy 198 Summary 202 Code Examples 203 CHAPTER 5 Object-Oriented Programming 208 Object-Oriented Programming 208 An Introduction to Python OOP 209 Python Classes and Instances 212 Methods Handling 219 Special Methods 221 Inheritance 227 Polymorphism 230 Encapsulation 233 Metaclasses 235 Summary 238 Code Examples 240 PART II Advanced Programming 248 CHAPTER 6 Extending and Embedding Python 250 Extending and Embedding Python 250 The Python/C API 252 Extending 252 Compiling and Linking Extension Modules 266 SWIG—The Simple Wrapper Interface Generator 272 Other Wrappers 274 Embedding 275 Summary 280 Code Examples 281 CHAPTER 7 Objects Interfacing and Distribution 288 Object Interfacing and Distribution 288 Interfacing Objects 289 Introduction to COM Objects 290 Implementing COM Objects in Python 295 Distributing Objects with Python 314 Summary 324 Code Examples 326 CHAPTER 8 Working with Databases 334 Working with Databases 334 Flat Databases 335 DBM (Database Managers) Databases 338 Object Serialization and Persistent Storage 344 The ODBC Module 351 ADO (ActiveX Data Objects) 354 Using SQL 356 Python DB API 364 Summary 377 CHAPTER 9 Other Advanced Topics 380 Other Advanced Topics 380 Manipulating Images 381 Working with Sounds 384 Restricted Execution Mode 389 Scientific Computing 392 Regular Expressions 398 Threads 405 Summary 411 Code Examples 412 PART III Network Programming 418 CHAPTER 10 Basic Network Background 420 Networking 420 Networking Concepts 421 HTTP 434 Accessing URLs 443 FTP 446 SMTP/POP3/IMAP 447 Newsgroups—Telnet and Gopher 450 Summary 452 CHAPTER 11 Web Development 456 Web Development 456 Configuring Web Servers for Python/CGI Scripts 457 Third-Party Internet Applications 462 Other Applications 468 Site Management Tools 471 Summary 476 CHAPTER 12 Scripting Programming 480 Web Programming 480 An Introduction to CGI 481 The cgi Module 483 Creating, Installing, and Running Your Script 485 Python Active Scripting 510 Summary 517 CHAPTER 13 Data Manipulation 520 Parsing and Manipulating Data 520 XML Processing 521 XML-RPC 539 XDR Data Exchange Format 541 Handling Other Markup Languages 546 MIME Parsing and Manipulation 559 Generic Conversion Functions 573 Summary 578 PART IV Graphical Interfaces 582 CHAPTER 14 Python and GUIs 584 Python GUI Toolkits 584 The Tkinter Module 586 Overview of Other GUI Modules 587 Designing a Good Interface 600 Summary 601 CHAPTER 15 Tkinter 604 Introduction to Tcl/Tk 604 Tkinter 605 Geometry Management 609 Handling Tkinter Events 614 Tkinter Widgets 619 Designing Applications 653 PMW—Python Mega Widgets 659 Tkinter Resources 659 Summary 660 PART V Developing with Python 662 CHAPTER 16 Development Environment 664 Building Python Applications 664 Development Strategy 665 Integrated Development Environments 676 IDLE 676 Pythonwin 690 Summary 700 CHAPTER 17 Development Tools 702 The Development Process of Python Programs 702 Compiling Python 703 Editing Code 707 Python Scripts 710 Generating an Executable Python Bytecode 714 Interpreter 715 Debugging the Application 718 Profiling Python 726 Distributing Python Applications 737 Summary 741 PART VI Python and Java 744 CHAPTER 18 JPython 746 Welcome to JPython 746 Java Integration 751 Downloading and Installing JPython 752 The Interpreter 756 The JPython Registry 758 Creating Graphical Interfaces 760 Embedding 761 jpythonc 763 Running JPython Applets 765 Summary 766 PART VII Appendixes 768 APPENDIX A Python/C API 770 Python/C API 770 The Very High Level Layer 780 Reference Counting 782 Exception Handling 783 Standard Exceptions 786 Utilities 788 Abstract Objects Layer 791 Concrete Objects Layer 800 Initialization, Finalization, and Threads 818 Memory Management 829 Defining New Object Types 833 APPENDIX B Running Python on Specific Platforms 836 Python on Win32 Systems 836 Python on MacOS Systems 839 Python on UNIX Systems 843 Other Platforms 844 APPENDIX C Python Copyright Notices 846 Python 2.0 License Information 846 Python’s Copyright Notice (version 1.6) 848 Python’s Copyright Notice (until version 1.5.2) 850 Copyright Notice of the profile and pstats Modules 851 Copyright Notice of JPython with OROMatcher 851 Copyright Notice of JPython without OROMatcher 853 APPENDIX D Migrating to Python 2.0 856 Python 1.6 or Python 2.0. Which One to Choose? 857 New Development Process 857 Enhancements 857 Expected Code Breaking 860 Index 862
دانلود کتاب Python Developer's Handbook (Developer's Library)