Read more
Informationen zum Autor James Payne is Editor in Chief of www.developershed.com, a network of high-technology sites that serves millions of unique visitors every month who are seeking tutorials, advice, answers, or articles. Klappentext Beginning Python: Using Python 2.6 and Python 3.1 introduces this open source, portable, interpreted, object-oriented programming language that combines remarkable power with clear syntax. This book enables you to quickly create robust, reliable, and reusable Python applications by teaching the basics so you can quickly develop Web and scientific applications, incorporate databases, and master systems tasks on various operating systems, including Linux, MAC OS, and Windows. You'll get a comprehensive tutorial that guides you from writing simple, basic Python scripts all the way through complex concepts, and also features a reference of the standard modules with examples illustrating how to implement features in the various modules. Plus, the book covers using Python in specific program development domains, such as XML, databases, scientific applications, network programming, and Web development.Note: CD-ROM/DVD and other supplementary materials are not included as part of eBook file. Zusammenfassung Beginning Python: Using Python 2. 6 and Python 3. 1 introduces this open source, portable, interpreted, object-oriented programming language that combines remarkable power with clear syntax. Inhaltsverzeichnis Introduction xxvii Part I: Dipping Your Toe into Python 1 Chapter 1: Programming Basics and Strings 3 How Programming is Different from Using a Computer 3 The First Steps 5 Beginning to Use Python - Strings 7 Putting Two Strings Together 11 Putting Strings Together in Different Ways 12 Summary 13 Exercises 14 Chapter 2: Numbers and Operators 15 Different Kinds of Numbers 15 Program Files 18 Using Numbers 24 Summary 28 Exercises 29 Chapter 3: Variables - Names for Values 31 Referring to Data - Using Names for Data 31 Using More Built-in Types 34 Other Common Sequence Properties 43 Summary 47 Exercises 48 Part II: Python Language and the Standard Library 49 Chapter 4: Making Decisions 51 Comparing Values - Are They the Same? 51 Doing the Opposite - Not Equal 53 Comparing Values - Which One Is More? 54 Reversing True and False 56 Looking for the Results of More Than One Comparison 56 Repetition 60 Handling Errors 65 Summary 67 Exercises 69 Chapter 5: Functions 71 Putting Your Program into Its Own File 71 Functions: Grouping Code under a Name 73 Layers of Functions 88 Summary 89 Exercises 90 Chapter 6: Classes and Objects 93 Thinking About Programming 93 Defining a Class 96 Summary 107 Exercises 108 Chapter 7: Organizing Programs 111 Modules 112 Packages 118 Modules and Packages 120 Basics of Testing Your Modules and Packages 124 Summary 124 Exercises 125 Chapter 8: Files and Directories 127 File Objects 127 Paths and Directories 131 Exceptions in os 132 Summary 142 Exercises 142 Chapter 9: Other Features of the Language 143 Lambda and Filter: Short Anonymous Functions 143 Map: Short-Circuiting Loops 144 Decisions within Lists - List Comprehension 145 Generating Iterators for Loops 146 Special String Substitution Using Dictionaries 148 Featured Modules 149 Summary 156 Exercises 156 Chapter 10: Building a Module 157 Exploring Modules 157 Creating Modules and Packages 162 Working with Classe...