• Tut
  • Ref
  • Lib
  • Api
  • Ext
  • image-search

1.5

  • Front Matter
  • Contents
  • image-plus1. Whetting Your Appetite
    • 1.1 Where From Here
  • image-plus2. Using the Python Interpreter
    • image-plus2.1 Invoking the Interpreter
      • 2.1.1 Argument Passing
      • 2.1.2 Interactive Mode
    • image-plus2.2 The Interpreter and Its Environment
      • 2.2.1 Error Handling
      • 2.2.2 Executable Python Scripts
      • 2.2.3 The Interactive Startup File
  • image-plus3. An Informal Introduction to Python
    • image-plus3.1 Using Python as a Calculator
      • 3.1.1 Numbers
      • 3.1.2 Strings
      • 3.1.3 Lists
    • 3.2 First Steps Towards Programming
  • image-plus4. More Control Flow Tools
    • 4.1 if Statements
    • 4.2 for Statements
    • 4.3 The range() Function
    • 4.4 break and continue Statements, and else Clauses on Loops
    • 4.5 pass Statements
    • 4.6 Defining Functions
    • image-plus4.7 More on Defining Functions
      • 4.7.1 Default Argument Values
      • 4.7.2 Keyword Arguments
      • 4.7.3 Arbitrary Argument Lists
      • 4.7.4 Lambda Forms
      • 4.7.5 Documentation Strings
  • image-plus5. Data Structures
    • image-plus5.1 More on Lists
      • 5.1.1 Functional Programming Tools
    • 5.2 The del statement
    • 5.3 Tuples and Sequences
    • 5.4 Dictionaries
    • 5.5 More on Conditions
    • 5.6 Comparing Sequences and Other Types
  • image-plus6. Modules
    • image-plus6.1 More on Modules
      • 6.1.1 The Module Search Path
      • 6.1.2 ``Compiled'' Python files
    • 6.2 Standard Modules
    • 6.3 The dir() Function
    • image-plus6.4 Packages
      • 6.4.1 Importing * From a Package
      • 6.4.2 Intra-package References
  • image-plus7. Input and Output
    • 7.1 Fancier Output Formatting
    • image-plus7.2 Reading and Writing Files
      • 7.2.1 Methods of File Objects
      • 7.2.2 The pickle Module
  • image-plus8. Errors and Exceptions
    • 8.1 Syntax Errors
    • 8.2 Exceptions
    • 8.3 Handling Exceptions
    • 8.4 Raising Exceptions
    • 8.5 User-defined Exceptions
    • 8.6 Defining Clean-up Actions
  • image-plus9. Classes
    • 9.1 A Word About Terminology
    • 9.2 Python Scopes and Name Spaces
    • image-plus9.3 A First Look at Classes
      • 9.3.1 Class Definition Syntax
      • 9.3.2 Class Objects
      • 9.3.3 Instance Objects
      • 9.3.4 Method Objects
    • 9.4 Random Remarks
    • image-plus9.5 Inheritance
      • 9.5.1 Multiple Inheritance
    • 9.6 Private Variables
    • image-plus9.7 Odds and Ends
      • 9.7.1 Exceptions Can Be Classes
  • 10. What Now?
  • image-plusA. Interactive Input Editing and History Substitution
    • A1. Line Editing
    • A2. History Substitution
    • A3. Key Bindings
    • A4. Commentary
  • About this document ...
  • Front Matter
  • Contents
  • image-plus1. Introduction
    • 1.1 Notation
  • image-plus2. Lexical analysis
    • image-plus2.1 Line structure
      • 2.1.1 Logical lines
      • 2.1.2 Physical lines
      • 2.1.3 Comments
      • 2.1.4 Explicit line joining
      • 2.1.5 Implicit line joining
      • 2.1.6 Blank lines
      • 2.1.7 Indentation
      • 2.1.8 Whitespace between tokens
    • 2.2 Other tokens
    • image-plus2.3 Identifiers and keywords
      • 2.3.1 Keywords
      • 2.3.2 Reserved classes of identifiers
    • image-plus2.4 Literals
      • 2.4.1 String literals
      • 2.4.2 String literal concatenation
      • 2.4.3 Numeric literals
      • 2.4.4 Integer and long integer literals
      • 2.4.5 Floating point literals
      • 2.4.6 Imaginary literals
    • 2.5 Operators
    • 2.6 Delimiters
  • image-plus3. Data model
    • 3.1 Objects, values and types
    • 3.2 The standard type hierarchy
    • image-plus3.3 Special method names
      • 3.3.1 Basic customization
      • 3.3.2 Customizing attribute access
      • 3.3.3 Emulating callable objects
      • 3.3.4 Emulating sequence and mapping types
      • 3.3.5 Additional methods for emulation of sequence types
      • 3.3.6 Emulating numeric types
  • image-plus4. Execution model
    • 4.1 Code blocks, execution frames, and namespaces
    • 4.2 Exceptions
  • image-plus5. Expressions
    • 5.1 Arithmetic conversions
    • image-plus5.2 Atoms
      • 5.2.1 Identifiers (Names)
      • 5.2.2 Literals
      • 5.2.3 Parenthesized forms
      • 5.2.4 List displays
      • 5.2.5 Dictionary displays
      • 5.2.6 String conversions
    • image-plus5.3 Primaries
      • 5.3.1 Attribute references
      • 5.3.2 Subscriptions
      • 5.3.3 Slicings
      • 5.3.4 Calls
    • 5.4 The power operator
    • 5.5 Unary arithmetic operations
    • 5.6 Binary arithmetic operations
    • 5.7 Shifting operations
    • 5.8 Binary bit-wise operations
    • 5.9 Comparisons
    • 5.10 Boolean operations
    • 5.11 Expression lists
    • 5.12 Summary
  • image-plus6. Simple statements
    • 6.1 Expression statements
    • 6.2 Assert statements
    • 6.3 Assignment statements
    • 6.4 The pass statement
    • 6.5 The del statement
    • 6.6 The print statement
    • 6.7 The return statement
    • 6.8 The raise statement
    • 6.9 The break statement
    • 6.10 The continue statement
    • 6.11 The import statement
    • 6.12 The global statement
    • 6.13 The exec statement
  • image-plus7. Compound statements
    • 7.1 The if statement
    • 7.2 The while statement
    • 7.3 The for statement
    • 7.4 The try statement
    • 7.5 Function definitions
    • 7.6 Class definitions
  • image-plus8. Top-level components
    • 8.1 Complete Python programs
    • 8.2 File input
    • 8.3 Interactive input
    • 8.4 Expression input
  • Index
  • About this document ...
  • Front Matter
  • Contents
  • 1. Introduction
  • image-plus2. Built-in Types, Exceptions and Functions
    • image-plus2.1 Built-in Types
      • 2.1.1 Truth Value Testing
      • 2.1.2 Boolean Operations
      • 2.1.3 Comparisons
      • 2.1.4 Numeric Types
      • 2.1.5 Sequence Types
      • 2.1.6 Mapping Types
      • 2.1.7 Other Built-in Types
      • 2.1.8 Special Attributes
    • 2.2 Built-in Exceptions
    • 2.3 Built-in Functions
  • image-plus3. Python Services
    • 3.1 Built-in Module sys
    • 3.2 Standard Module types
    • 3.3 Standard Module UserDict
    • 3.4 Standard Module UserList
    • 3.5 Built-in Module operator
    • 3.6 Standard Module traceback
    • 3.7 Standard Module pickle
    • 3.8 Built-in Module cPickle
    • 3.9 Standard Module copy_reg
    • 3.10 Standard Module shelve
    • 3.11 Standard Module copy
    • 3.12 Built-in Module marshal
    • image-plus3.13 Built-in Module imp
      • 3.13.1 Examples
    • image-plus3.14 Built-in Module parser
      • 3.14.1 Creating AST Objects
      • 3.14.2 Converting AST Objects
      • 3.14.3 Queries on AST Objects
      • 3.14.4 Exceptions and Error Handling
      • 3.14.5 AST Objects
      • 3.14.6 Examples
    • 3.15 Standard Module symbol
    • 3.16 Standard Module token
    • 3.17 Standard Module keyword
    • 3.18 Standard Module code
    • image-plus3.19 Standard Module pprint
      • 3.19.1 PrettyPrinter Objects
    • image-plus3.20 Standard Module dis
      • 3.20.1 Python Byte Code Instructions
    • 3.21 Standard Module site
    • 3.22 Standard Module user
    • 3.23 Built-in Module __builtin__
    • 3.24 Built-in Module __main__
  • image-plus4. String Services
    • 4.1 Standard Module string
    • image-plus4.2 Built-in Module re
      • 4.2.1 Regular Expression Syntax
      • 4.2.2 Module Contents
      • 4.2.3 Regular Expression Objects
      • 4.2.4 Match Objects
    • image-plus4.3 Built-in Module regex
      • 4.3.1 Regular Expressions
      • 4.3.2 Module Contents
    • 4.4 Standard Module regsub
    • 4.5 Built-in Module struct
    • 4.6 Standard Module StringIO
    • 4.7 Built-in Module cStringIO
  • image-plus5. Miscellaneous Services
    • 5.1 Built-in Module math
    • 5.2 Built-in Module cmath
    • 5.3 Standard Module whrandom
    • 5.4 Standard Module random
    • image-plus5.5 Standard Module bisect
      • 5.5.1 Example
    • 5.6 Built-in Module array
    • 5.7 Standard Module fileinput
    • 5.8 Standard Module calendar
    • image-plus5.9 Standard Module cmd
      • 5.9.1 Cmd Objects
  • image-plus6. Generic Operating System Services
    • 6.1 Standard Module os
    • 6.2 Built-in Module time
    • 6.3 Standard Module getopt
    • 6.4 Standard Module tempfile
    • 6.5 Standard Module errno
    • 6.6 Standard Module glob
    • 6.7 Standard Module fnmatch
    • image-plus6.8 Standard Module locale
      • 6.8.1 Background, details, hints, tips and caveats
      • 6.8.2 For extension writers and programs that embed Python
  • image-plus7. Optional Operating System Services
    • 7.1 Built-in Module signal
    • image-plus7.2 Built-in Module socket
      • 7.2.1 Socket Objects
      • 7.2.2 Example
    • 7.3 Built-in Module select
    • 7.4 Built-in Module thread
    • image-plus7.5 Standard Module threading
      • 7.5.1 Lock Objects
      • 7.5.2 RLock Objects
      • 7.5.3 Condition Objects
      • 7.5.4 Semaphore Objects
      • 7.5.5 Event Objects
      • 7.5.6 Thread Objects
    • image-plus7.6 Standard Module Queue
      • 7.6.1 Queue Objects
    • 7.7 Standard Module anydbm
    • 7.8 Standard Module dumbdbm
    • 7.9 Standard Module whichdb
    • 7.10 Built-in Module zlib
    • 7.11 Standard Module gzip
  • image-plus8. Unix Specific Services
    • 8.1 Built-in Module posix
    • 8.2 Standard Module posixpath
    • 8.3 Built-in Module pwd
    • 8.4 Built-in Module grp
    • 8.5 Built-in Module crypt
    • 8.6 Built-in Module dbm
    • 8.7 Built-in Module gdbm
    • image-plus8.8 Built-in Module termios
      • 8.8.1 Example
    • 8.9 Standard Module TERMIOS
    • 8.10 Built-in Module fcntl
    • 8.11 Standard Module posixfile
    • image-plus8.12 Built-in Module resource
      • 8.12.1 Resource Limits
      • 8.12.2 Resource Usage
    • 8.13 Built-in Module syslog
    • 8.14 Standard Module stat
    • image-plus8.15 Standard Module popen2
      • 8.15.1 Popen3 Objects
    • 8.16 Standard Module commands
  • image-plus9. The Python Debugger
    • 9.1 Debugger Commands
    • 9.2 How It Works
  • image-plus10. The Python Profiler
    • 10.1 Introduction to the profiler
    • 10.2 How Is This Profiler Different From The Old Profiler?
    • 10.3 Instant Users Manual
    • 10.4 What Is Deterministic Profiling?
    • image-plus10.5 Reference Manual
      • 10.5.1 The Stats Class
    • 10.6 Limitations
    • 10.7 Calibration
    • image-plus10.8 Extensions -- Deriving Better Profilers
      • 10.8.1 OldProfile Class
      • 10.8.2 HotProfile Class
  • image-plus11. Internet and WWW Services
    • image-plus11.1 Standard Module cgi
      • 11.1.1 Introduction
      • 11.1.2 Using the cgi module
      • 11.1.3 Old classes
      • 11.1.4 Functions
      • 11.1.5 Caring about security
      • 11.1.6 Installing your CGI script on a Unix system
      • 11.1.7 Testing your CGI script
      • 11.1.8 Debugging CGI scripts
      • 11.1.9 Common problems and solutions
    • 11.2 Standard Module urllib
    • image-plus11.3 Standard Module httplib
      • 11.3.1 HTTP Objects
      • 11.3.2 Example
    • image-plus11.4 Standard Module ftplib
      • 11.4.1 FTP Objects
    • 11.5 Standard Module gopherlib
    • image-plus11.6 Standard Module poplib
      • 11.6.1 POP3 Objects
      • 11.6.2 POP3 Example
    • image-plus11.7 Standard Module imaplib
      • 11.7.1 IMAP4 Objects
      • 11.7.2 IMAP4 Example
    • image-plus11.8 Standard Module nntplib
      • 11.8.1 NNTP Objects
    • image-plus11.9 Standard Module smtplib
      • 11.9.1 SMTP Objects
      • 11.9.2 SMTP Example
    • 11.10 Standard Module urlparse
    • 11.11 Standard Module sgmllib
    • 11.12 Standard Module htmllib
    • 11.13 Standard Module xmllib
    • image-plus11.14 Standard Module formatter
      • 11.14.1 The Formatter Interface
      • 11.14.2 Formatter Implementations
      • 11.14.3 The Writer Interface
      • 11.14.4 Writer Implementations
    • image-plus11.15 Standard Module rfc822
      • 11.15.1 Message Objects
      • 11.15.2 AddressList Objects
    • image-plus11.16 Standard Module mimetools
      • 11.16.1 Additional Methods of Message objects
    • image-plus11.17 Standard Module multifile
      • 11.17.1 MultiFile Objects
      • 11.17.2 Multifile Example
    • image-plus11.18 Standard Module binhex
      • 11.18.1 Notes
    • 11.19 Standard Module uu
    • 11.20 Built-in Module binascii
    • image-plus11.21 Standard Module xdrlib
      • 11.21.1 Packer Objects
      • 11.21.2 Unpacker Objects
      • 11.21.3 Exceptions
    • 11.22 Standard Module mailcap
    • 11.23 Standard Module mimetypes
    • 11.24 Standard Module base64
    • 11.25 Standard Module quopri
    • 11.26 Standard Module SocketServer
    • image-plus11.27 Standard Module mailbox
      • 11.27.1 Mailbox Objects
    • 11.28 Standard Module mimify
    • 11.29 Standard Module BaseHTTPServer
  • image-plus12. Restricted Execution
    • image-plus12.1 Standard Module rexec
      • 12.1.1 An example
    • 12.2 Standard Module Bastion
  • image-plus13. Multimedia Services
    • 13.1 Built-in Module audioop
    • 13.2 Built-in Module imageop
    • 13.3 Standard Module aifc
    • 13.4 Built-in Module jpeg
    • 13.5 Built-in Module rgbimg
    • 13.6 Standard Module imghdr
  • image-plus14. Cryptographic Services
    • 14.1 Built-in Module md5
    • 14.2 Built-in Module mpz
    • 14.3 Built-in Module rotor
  • image-plus15. SGI IRIX Specific Services
    • image-plus15.1 Built-in Module al
      • 15.1.1 Configuration Objects
      • 15.1.2 Port Objects
    • 15.2 Standard Module AL
    • image-plus15.3 Built-in Module cd
      • 15.3.1 Player Objects
      • 15.3.2 Parser Objects
    • image-plus15.4 Built-in Module fl
      • 15.4.1 Functions Defined in Module fl
      • 15.4.2 Form Objects
      • 15.4.3 FORMS Objects
    • 15.5 Standard Module FL
    • 15.6 Standard Module flp
    • 15.7 Built-in Module fm
    • 15.8 Built-in Module gl
    • 15.9 Standard Module DEVICE
    • 15.10 Standard Module GL
    • 15.11 Built-in Module imgfile
  • image-plus16. SunOS Specific Services
    • image-plus16.1 Built-in Module sunaudiodev
      • 16.1.1 Audio Device Objects
  • image-plus17. Undocumented Modules
    • 17.1 Frameworks; somewhat harder to document, but well worth the effort
    • 17.2 Stuff useful to a lot of people, including the CGI crowd
    • 17.3 Miscellaneous useful utilities
    • 17.4 Parsing Python
    • 17.5 Platform specific modules
    • 17.6 Code objects and files, debugger etc.
    • 17.7 Multimedia
    • 17.8 Oddities
    • 17.9 Obsolete
    • 17.10 Extension modules
  • Module Index
  • Index
  • About this document ...
  • Front Matter
  • Contents
  • image-plus1. Introduction
    • 1.1 Include Files
    • image-plus1.2 Objects, Types and Reference Counts
      • 1.2.1 Reference Counts
      • 1.2.2 Types
    • 1.3 Exceptions
    • 1.4 Embedding Python
  • 2. The Very High Level Layer
  • 3. Reference Counting
  • image-plus4. Exception Handling
    • 4.1 Standard Exceptions
  • image-plus5. Utilities
    • 5.1 OS Utilities
    • 5.2 Process Control
    • 5.3 Importing Modules
  • image-plus6. Abstract Objects Layer
    • 6.1 Object Protocol
    • 6.2 Number Protocol
    • 6.3 Sequence Protocol
    • 6.4 Mapping Protocol
    • 6.5 Constructors
  • image-plus7. Concrete Objects Layer
    • image-plus7.1 Fundamental Objects
      • 7.1.1 Type Objects
      • 7.1.2 The None Object
    • image-plus7.2 Sequence Objects
      • 7.2.1 String Objects
      • 7.2.2 Tuple Objects
      • 7.2.3 List Objects
    • image-plus7.3 Mapping Objects
      • 7.3.1 Dictionary Objects
    • image-plus7.4 Numeric Objects
      • 7.4.1 Plain Integer Objects
      • 7.4.2 Long Integer Objects
      • 7.4.3 Floating Point Objects
      • 7.4.4 Complex Number Objects
    • image-plus7.5 Other Objects
      • 7.5.1 File Objects
      • 7.5.2 CObjects
  • image-plus8. Initialization, Finalization, and Threads
    • 8.1 Thread State and the Global Interpreter Lock
  • 9. Defining New Object Types
  • 10. Debugging
  • Index
  • About this document ...
  • Front Matter
  • Contents
  • image-plus1. Extending Python with C or C++ code
    • 1.1 A Simple Example
    • 1.2 Intermezzo: Errors and Exceptions
    • 1.3 Back to the Example
    • 1.4 The Module's Method Table and Initialization Function
    • 1.5 Compilation and Linkage
    • 1.6 Calling Python Functions From C
    • 1.7 Format Strings for PyArg_ParseTuple()
    • 1.8 Keyword Parsing with PyArg_ParseTupleAndKeywords()
    • 1.9 The Py_BuildValue() Function
    • image-plus1.10 Reference Counts
      • 1.10.1 Reference Counting in Python
      • 1.10.2 Ownership Rules
      • 1.10.3 Thin Ice
      • 1.10.4 NULL Pointers
    • 1.11 Writing Extensions in C++
  • image-plus2. Embedding Python in another application
    • 2.1 Embedding Python in C++
  • image-plus3. Dynamic Loading
    • image-plus3.1 Configuring and Building the Interpreter for Dynamic Loading
      • 3.1.1 Shared Libraries
      • 3.1.2 SGI IRIX 4 Dynamic Loading
      • 3.1.3 GNU Dynamic Loading
    • image-plus3.2 Building a Dynamically Loadable Module
      • 3.2.1 Shared Libraries
      • 3.2.2 SGI IRIX 4 Dynamic Loading
      • 3.2.3 GNU Dynamic Loading
  • About this document ...

Website

PEPs

Newsgroups

Advanced search

Package index

Browse the tree of packages

Issue tracker

  • A