This book offers Python programmers one place to look when they needhelp remembering or deciphering the syntax of this open source languageand its many powerful but scantily documented modules. Thiscomprehensive reference guide makes it easy to look up the mostfrequently needed information--not just about the Python languageitself, but also the most frequently used parts of the standard libraryand the most important Read more... Abstract: This book offers Python programmers one place to look when they needhelp remembering or deciphering the syntax of this open source languageand its many powerful but scantily documented modules. Thiscomprehensive reference guide makes it easy to look up the mostfrequently needed information--not just about the Python languageitself, but also the most frequently used parts of the standard libraryand the most important third-party extensions. Ask any Python aficionado and you'll hear that Python programmers haveit all: an elegant object-oriented language with readable andmaintainable syntax, that allows for easy integration with componentsin C, C++, Java, or C#, and an enormous collection of precoded standardlibrary and third-party extension modules. Moreover, Python is easy tolearn, yet powerful enough to take on the most ambitious programmingchallenges. But what Python programmers used to lack is a concise andclear reference resource, with the appropriate measure of guidance inhow best to use Python's great power. Python in aNutshell fills this need. Python in a Nutshell, Second Edition covers morethan the language itself; it also deals with the mostfrequently used parts of the standard library, and the most popular andimportant third party extensions. Revised and expanded forPython 2.5, this book now contains the gory details of Python's newsubprocess module and breaking news about Microsoft's newIronPython project. Our "Nutshell" format fits Python perfectly bypresenting the highlights of the most important modules and functionsin its standard library, which cover over 90% of your practicalprogramming needs. This book includes: A fast-paced tutorial on the syntax of the Python language An explanation of object-oriented programming in Python Coverage of iterators, generators, exceptions, modules, packages, strings, and regular expressions A quick reference for Python's built-in types and functionsand key modules Reference material on important third-party extensions, such as Numeric and Tkinter Information about extending and embedding Python Python in a Nutshell provides a solid, no-nonsense quick reference to information that programmers rely on themost. This book will immediately earn its place in any Pythonprogrammer's library. Praise for the First Edition: "In a nutshell, Python in a Nutshell serves oneprimary goal: to act as an immediately accessible goal for the Pythonlanguage. True, you can get most of the same core information that ispr This book offers Python programmers one place to look when they needhelp remembering or deciphering the syntax of this open source languageand its many powerful but scantily documented modules. Thiscomprehensive reference guide makes it easy to look up the mostfrequently needed information--not just about the Python languageitself, but also the most frequently used parts of the standard libraryand the most important third-party extensions. Ask any Python aficionado and you'll hear that Python programmers haveit all: an elegant object-oriented language with readable andmaintainable syntax, that allows for easy integration with componentsin C, C++, Java, or C#, and an enormous collection of precoded standardlibrary and third-party extension modules. Moreover, Python is easy tolearn, yet powerful enough to take on the most ambitious programmingchallenges. But what Python programmers used to lack is a concise andclear reference resource, with the appropriate measure of guidance inhow best to use Python's great power. Python in aNutshell fills this need. Python in a Nutshell, Second Edition covers morethan the language itself; it also deals with the mostfrequently used parts of the standard library, and the most popular andimportant third party extensions. Revised and expanded forPython 2.5, this book now contains the gory details of Python's newsubprocess module and breaking news about Microsoft's newIronPython project. Our "Nutshell" format fits Python perfectly bypresenting the highlights of the most important modules and functionsin its standard library, which cover over 90% of your practicalprogramming needs. This book includes: A fast-paced tutorial on the syntax of the Python language An explanation of object-oriented programming in Python Coverage of iterators, generators, exceptions, modules, packages, strings, and regular expressions A quick reference for Python's built-in types and functionsand key modules Reference material on important third-party extensions, such as Numeric and Tkinter Information about extending and embedding Python Python in a Nutshell provides a solid, no-nonsense quick reference to information that programmers rely on themost. This book will immediately earn its place in any Pythonprogrammer's library. Praise for the First Edition: "In a nutshell, Python in a Nutshell serves oneprimary goal: to act as an immediately accessible goal for the Pythonlanguage. True, you can get most of the same core information that ispresented within the covers of this volume online, but this willinvariably be broken into multiple files, and in all likelihood lackingthe examples or the exact syntax description necessary to trulyunderstand a command."--Richard Cobbett, Linux Format "O'Reilly has several good books, of which Python in aNutshell by Alex Martelli is probably the best for giving yousome idea of what Python is about and how to do useful things with it."--Jerry Pournelle, Byte Magazine Copyright Table of Contents Preface How This Book Is Organized Part I, Getting Started with Python Part II, Core Python Language and Built-ins Part III, Python Library and Extension Modules Part IV, Network and Web Programming Part V, Extending and Embedding Conventions Used in This Book Reference Conventions Typographic Conventions Using Code Examples How to Contact Us Safari® Enabled Acknowledgments I Chapter 1. Introduction to Python The Python Language The Python Standard Library and Extension Modules Python Implementations CPython Jython IronPython. Choosing Between CPython, Jython, and IronPythonPyPy and Other Experimental Versions Licensing and Price Issues Python Development and Versions Python Resources Documentation Newsgroups and Mailing Lists Special-Interest Groups Python Business Forum Python Journal Extension Modules and Python Sources The Python Cookbook Books and Magazines Chapter 2. Installation Installing Python from Source Code Windows Uncompressing and unpacking the Python source code Building the Python source code with Microsoft Visual Studio 2003 Building Python for debugging. Installing after the buildBuilding Python for Cygwin Unix-Like Platforms Uncompressing and unpacking the Python source code Configuring, building, and testing Installing after the build Installing Python from Binaries Apple Macintosh Installing Jython Installing IronPython Chapter 3. The Python Interpreter The python Program Environment Variables Command-Line Syntax and Options Interactive Sessions Python Development Environments IDLE Other Free Cross-Platform Python IDEs Platform-Specific Free Python IDEs Commercial Python IDEs Free Text Editors with Python Support. Tools for Checking Python ProgramsRunning Python Programs The jython Interpreter The IronPython Interpreter II Chapter 4. The Python Language Lexical Structure Lines and Indentation Character Sets Tokens Identifiers Keywords Operators Delimiters Literals Statements Simple statements Compound statements Data Types Numbers Integer numbers Floating-point numbers Complex numbers Sequences Iterables Strings Tuples Lists Sets Dictionaries None Callables Boolean Values Variables and Other References Variables Object attributes and items. Accessing nonexistent referencesAssignment Statements Plain assignment Augmented assignment del Statements Expressions and Operators Comparison Chaining Short-Circuiting Operators The Python 2.5 ternary operator Numeric Operations Numeric Conversions Arithmetic Operations Division Exponentiation Comparisons Bitwise Operations on Integers Sequence Operations Sequences in General Sequence conversions Concatenation and repetition Membership testing Indexing a sequence Slicing a sequence Strings Tuples Lists Modifying a list In-place operations on a list List methods. This book offers Python programmers one place to look when they needhelp remembering or deciphering the syntax of this open source languageand its many powerful but scantily documented modules. Thiscomprehensive reference guide makes it easy to look up the mostfrequently needed information--not just about the Python languageitself, but also the most frequently used parts of the standard libraryand the most important third-party extensions. Ask any Python aficionado and you'll hear that Python programmers haveit all: an elegant object-oriented language with readable andmaintainab.;Copyright; Table of Contents; Preface; How This Book Is Organized; Part I, Getting Started with Python; Part II, Core Python Language and Built-ins; Part III, Python Library and Extension Modules; Part IV, Network and Web Programming; Part V, Extending and Embedding; Conventions Used in This Book; Reference Conventions; Typographic Conventions; Using Code Examples; How to Contact Us; Safari® Enabled; Acknowledgments; I; Chapter 1. Introduction to Python; The Python Language; The Python Standard Library and Extension Modules; Python Implementations; CPython; Jython; IronPython. Quickreference for Python's built-in types and functionsand key modules Reference material on important third-party extensions,such as Numeric and TkinterInformation about extending and embedding Python Python in a Nutshell provides a solid,no-nonsense quick reference to information that programmers rely on themost. This book will immediately earn its place in any Pythonprogrammer's library. Praise for the First Edition: "In a nutshell, Python in a Nutshell serves oneprimary goal: to act as an immediately accessible goal for the Pythonlanguage. True, you can get most of the same core information that ispresented within the covers of this volume online, but this willinvariably be broken into multiple files, and in all likelihood lackingthe examples or the exact syntax description necessary to trulyunderstand a command." --Richard Cobbett, Linux Format "O'Reilly has several good books, of which Python in aNutshell by Alex Martelli is probably the best for giving yousome idea of what Python is about and how to do useful things with it." --Jerry Pournelle, Byte Magazine This book offers Python programmers one place to look when they need help remembering or deciphering the syntax of this open source language and its many powerful but scantily documented modules. This comprehensive reference guide makes it easy to look up the most frequently needed information--not just about the Python language itself, but also the most frequently used parts of the standard library and the most important third-party extensions. Ask any Python aficionado and you'll hear that Python programmers have it all: an elegant object-oriented language with readable and maintainable syntax, that allows for easy integration with components in C, C++, Java, or C#, and an enormous collection of precoded standard library and third-party extension modules. Moreover, Python is easy to learn, yet powerful enough to take on the most ambitious programming challenges. But what Python programmers... Note: CD-ROM/DVD and other supplementary materials are not included. COMPUTERS / Programming Languages / JavaScript This volume offers Python programmers a straightforward guide to the important tools and modules of this open source language. It deals with the most frequently used parts of the standard library as well as the most popular and important third party extensions Demonstrates the programming language's strength as a Web development tool, covering syntax, data types, built-ins, the Python standard module library, and real world examples