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

1.6

  • 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 Unicode Strings
      • 3.1.4 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 Using Lists as Stacks
      • 5.1.2 Using Lists as Queues
      • 5.1.3 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
    • A.1 Line Editing
    • A.2 History Substitution
    • A.3 Key Bindings
    • A.4 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.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 sys -- System-specific parameters and functions
    • 3.2 types -- Names for all built-in types
    • 3.3 UserDict -- Class wrapper for dictionary objects
    • 3.4 UserList -- Class wrapper for list objects
    • 3.5 UserString -- Class wrapper for string objects
    • 3.6 operator -- Standard operators as functions.
    • image-plus3.7 traceback -- Print or retrieve a stack traceback
      • 3.7.1 Traceback Example
    • 3.8 linecache -- Random access to text lines
    • image-plus3.9 pickle -- Python object serialization
      • 3.9.1 Example
    • 3.10 cPickle -- Alternate implementation of pickle
    • 3.11 copy_reg -- Register pickle support functions
    • 3.12 shelve -- Python object persistency
    • 3.13 copy -- Shallow and deep copy operations
    • 3.14 marshal -- Alternate Python object serialization
    • image-plus3.15 imp -- Access the import internals
      • 3.15.1 Examples
    • image-plus3.16 parser -- Access Python parse trees
      • 3.16.1 Creating AST Objects
      • 3.16.2 Converting AST Objects
      • 3.16.3 Queries on AST Objects
      • 3.16.4 Exceptions and Error Handling
      • 3.16.5 AST Objects
      • 3.16.6 Examples
    • 3.17 symbol -- Constants used with Python parse trees
    • 3.18 token -- Constants used with Python parse trees
    • 3.19 keyword -- Testing for Python keywords
    • 3.20 tokenize -- Tokenizer for Python source
    • 3.21 tabnanny -- Detection of ambiguous indentation
    • image-plus3.22 pyclbr -- Python class browser support
      • 3.22.1 Class Descriptor Objects
    • image-plus3.23 code -- Interpreter base classes
      • 3.23.1 Interactive Interpreter Objects
      • 3.23.2 Interactive Console Objects
    • 3.24 codeop -- Compile Python code
    • image-plus3.25 pprint -- Data pretty printer.
      • 3.25.1 PrettyPrinter Objects
    • image-plus3.26 repr -- Alternate repr() implementation.
      • 3.26.1 Repr Objects
      • 3.26.2 Subclassing Repr Objects
    • 3.27 py_compile -- Compile Python source files
    • 3.28 compileall -- Byte-compile Python libraries
    • image-plus3.29 dis -- Disassembler.
      • 3.29.1 Python Byte Code Instructions
    • 3.30 new -- Runtime implementation object creation
    • 3.31 site -- Site-specific configuration hook
    • 3.32 user -- User-specific configuration hook
    • 3.33 __builtin__ -- Built-in functions
    • 3.34 __main__ -- Top-level script environment.
  • image-plus4. String Services
    • 4.1 string -- Common string operations
    • image-plus4.2 re -- Perl-style regular expression operations.
      • 4.2.1 Regular Expression Syntax
      • 4.2.2 Matching vs. Searching
      • 4.2.3 Module Contents
      • 4.2.4 Regular Expression Objects
      • 4.2.5 Match Objects
    • image-plus4.3 regex -- Regular expression search and match operations.
      • 4.3.1 Regular Expressions
      • 4.3.2 Module Contents
    • 4.4 regsub -- String operations using regular expressions
    • 4.5 struct -- Interpret strings as packed binary data
    • 4.6 fpformat -- Floating point conversions
    • 4.7 StringIO -- Read and write strings as files
    • 4.8 cStringIO -- Faster version of StringIO
    • 4.9 codecs -- Codec registry and base classes
  • image-plus5. Miscellaneous Services
    • 5.1 math -- Mathematical functions
    • 5.2 cmath -- Mathematical functions for complex numbers
    • image-plus5.3 random -- Generate pseudo-random numbers
      • 5.3.1 The Random Number Generator Interface
    • 5.4 whrandom -- Pseudo-random number generator
    • image-plus5.5 bisect -- Array bisection algorithm
      • 5.5.1 Example
    • 5.6 array -- Efficient arrays of numeric values
    • image-plus5.7 ConfigParser -- Configuration file parser
      • 5.7.1 ConfigParser Objects
    • 5.8 fileinput -- Iterate over lines from multiple input streams
    • 5.9 calendar -- General calendar-related functions
    • image-plus5.10 cmd -- Build line-oriented command interpreters.
      • 5.10.1 Cmd Objects
    • image-plus5.11 shlex -- Simple lexical analysis
      • 5.11.1 shlex Objects
  • image-plus6. Generic Operating System Services
    • image-plus6.1 os -- Miscellaneous OS interfaces
      • 6.1.1 Process Parameters
      • 6.1.2 File Object Creation
      • 6.1.3 File Descriptor Operations
      • 6.1.4 Files and Directories
      • 6.1.5 Process Management
      • 6.1.6 Miscellanenous System Information
    • 6.2 os.path -- Common pathname manipulations
    • 6.3 dircache -- Cached directory listings
    • 6.4 stat -- Interpreting stat() results
    • 6.5 statcache -- An optimization of os.stat()
    • 6.6 statvfs -- Constants used with os.statvfs()
    • 6.7 filecmp -- File Comparisons
    • 6.8 time -- Time access and conversions
    • image-plus6.9 sched -- Event scheduler
      • 6.9.1 Scheduler Objects
    • 6.10 getpass -- Portable password input
    • image-plus6.11 curses -- Terminal independant console handling
      • 6.11.1 Constants and Functions
      • 6.11.2 Window Objects
    • 6.12 getopt -- Parser for command line options.
    • 6.13 tempfile -- Generate temporary file names
    • 6.14 errno -- Standard errno system symbols.
    • 6.15 glob -- Unix style pathname pattern expansion
    • 6.16 fnmatch -- Unix filename pattern matching
    • image-plus6.17 shutil -- High-level file operations
      • 6.17.1 Example
    • image-plus6.18 locale -- Internationalization services
      • 6.18.1 Background, details, hints, tips and caveats
      • 6.18.2 For extension writers and programs that embed Python
    • image-plus6.19 mutex -- Mutual exclusion support
      • 6.19.1 Mutex Objects
  • image-plus7. Optional Operating System Services
    • image-plus7.1 signal -- Set handlers for asynchronous events.
      • 7.1.1 Example
    • image-plus7.2 socket -- Low-level networking interface
      • 7.2.1 Socket Objects
      • 7.2.2 Example
    • 7.3 select -- Waiting for I/O completion
    • 7.4 thread -- Multiple threads of control
    • image-plus7.5 threading -- Higher-level threading interface
      • 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 Queue -- A synchronized queue class.
      • 7.6.1 Queue Objects
    • 7.7 anydbm -- Generic access to DBM-style databases
    • 7.8 dumbdbm -- Portable DBM implementation
    • image-plus7.9 dbhash -- DBM-style interface to the BSD database library
      • 7.9.1 Database Objects
    • 7.10 whichdb -- Guess which DBM module created a database
    • image-plus7.11 bsddb -- Interface to Berkeley DB library
      • 7.11.1 Hash, BTree and Record Objects
    • 7.12 zlib -- Compression compatible with gzip
    • 7.13 gzip -- Support for gzip files
    • image-plus7.14 zipfile -- Work with ZIP archives
      • 7.14.1 ZipFile Objects
    • image-plus7.15 rlcompleter -- Completion function for readline
      • 7.15.1 Completer Objects
  • image-plus8. Unix Specific Services
    • image-plus8.1 posix -- The most common POSIX system calls
      • 8.1.1 Large File Support
      • 8.1.2 Module Contents
    • 8.2 pwd -- The password database
    • 8.3 grp -- The group database
    • 8.4 crypt -- Function to check Unix passwords
    • image-plus8.5 dl -- Call C functions in shared objects
      • 8.5.1 Dl Objects
    • 8.6 dbm -- Simple ``database'' interface
    • 8.7 gdbm -- GNU's reinterpretation of dbm
    • image-plus8.8 termios -- POSIX style tty control
      • 8.8.1 Example
    • 8.9 TERMIOS -- Constants used with the termios module
    • 8.10 tty -- Terminal control functions
    • 8.11 pty -- Pseudo-terminal utilities
    • 8.12 fcntl -- The fcntl() and ioctl() system calls
    • image-plus8.13 pipes -- Interface to shell pipelines
      • 8.13.1 Template Objects
    • 8.14 posixfile -- File-like objects with locking support
    • image-plus8.15 resource -- Resource usage information
      • 8.15.1 Resource Limits
      • 8.15.2 Resource Usage
    • 8.16 nis -- Interface to Sun's NIS (Yellow Pages)
    • 8.17 syslog -- Unix syslog library routines
    • image-plus8.18 popen2 -- Subprocesses with accessible I/O streams
      • 8.18.1 Popen3 Objects
    • 8.19 commands -- Utilities for running 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 Protocols and Support
    • image-plus11.1 cgi -- Common Gateway Interface support.
      • 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
    • image-plus11.2 urllib -- Open an arbitrary resource by URL
      • 11.2.1 URLopener Objects
      • 11.2.2 Examples
    • image-plus11.3 httplib -- HTTP protocol client
      • 11.3.1 HTTP Objects
      • 11.3.2 Example
    • image-plus11.4 ftplib -- FTP protocol client
      • 11.4.1 FTP Objects
    • 11.5 gopherlib -- Gopher protocol client
    • image-plus11.6 poplib -- POP3 protocol client
      • 11.6.1 POP3 Objects
      • 11.6.2 POP3 Example
    • image-plus11.7 imaplib -- IMAP4 protocol client
      • 11.7.1 IMAP4 Objects
      • 11.7.2 IMAP4 Example
    • image-plus11.8 nntplib -- NNTP protocol client
      • 11.8.1 NNTP Objects
    • image-plus11.9 smtplib -- SMTP protocol client
      • 11.9.1 SMTP Objects
      • 11.9.2 SMTP Example
    • image-plus11.10 telnetlib -- Telnet client
      • 11.10.1 Telnet Objects
      • 11.10.2 Telnet Example
    • 11.11 urlparse -- Parse URLs into components.
    • 11.12 SocketServer -- A framework for network servers.
    • 11.13 BaseHTTPServer -- Basic HTTP server.
    • 11.14 SimpleHTTPServer -- A Do-Something Request Handler
    • 11.15 CGIHTTPServer -- A Do-Something Request Handler
    • image-plus11.16 asyncore -- Asynchronous socket handler
      • 11.16.1 Example basic HTTP client
  • image-plus12. Internet Data Handling
    • 12.1 sgmllib -- Simple SGML parser
    • image-plus12.2 htmllib -- A parser for HTML documents
      • 12.2.1 HTMLParser Objects
    • 12.3 htmlentitydefs -- Definitions of HTML general entities
    • image-plus12.4 xmllib -- A parser for XML documents
      • 12.4.1 XML Namespaces
    • image-plus12.5 formatter -- Generic output formatting
      • 12.5.1 The Formatter Interface
      • 12.5.2 Formatter Implementations
      • 12.5.3 The Writer Interface
      • 12.5.4 Writer Implementations
    • image-plus12.6 rfc822 -- Parse RFC 822 mail headers
      • 12.6.1 Message Objects
      • 12.6.2 AddressList Objects
    • image-plus12.7 mimetools -- Tools for parsing MIME messages
      • 12.7.1 Additional Methods of Message objects
    • image-plus12.8 MimeWriter -- Generic MIME file writer
      • 12.8.1 MimeWriter Objects
    • image-plus12.9 multifile -- Support for files containing distinct parts
      • 12.9.1 MultiFile Objects
      • 12.9.2 MultiFile Example
    • image-plus12.10 binhex -- Encode and decode binhex4 files
      • 12.10.1 Notes
    • 12.11 uu -- Encode and decode uuencode files
    • 12.12 binascii -- Convert between binary and ASCII
    • image-plus12.13 xdrlib -- Encode and decode XDR data.
      • 12.13.1 Packer Objects
      • 12.13.2 Unpacker Objects
      • 12.13.3 Exceptions
    • 12.14 mailcap -- Mailcap file handling.
    • 12.15 mimetypes -- Map filenames to MIME types
    • 12.16 base64 -- Encode and decode MIME base64 data
    • 12.17 quopri -- Encode and decode MIME quoted-printable data
    • image-plus12.18 mailbox -- Read various mailbox formats
      • 12.18.1 Mailbox Objects
    • image-plus12.19 mhlib -- Access to MH mailboxes
      • 12.19.1 MH Objects
      • 12.19.2 Folder Objects
      • 12.19.3 Message Objects
    • 12.20 mimify -- MIME processing of mail messages
    • image-plus12.21 netrc -- netrc file processing
      • 12.21.1 netrc Objects
    • 12.22 robotparser -- Parser for robots.txt
  • image-plus13. Restricted Execution
    • image-plus13.1 rexec -- Restricted execution framework
      • 13.1.1 An example
    • 13.2 Bastion -- Restricting access to objects
  • image-plus14. Multimedia Services
    • 14.1 audioop -- Manipulate raw audio data
    • 14.2 imageop -- Manipulate raw image data
    • 14.3 aifc -- Read and write AIFF and AIFC files
    • image-plus14.4 sunau -- Read and write Sun AU files
      • 14.4.1 AU_read Objects
      • 14.4.2 AU_write Objects
    • image-plus14.5 wave -- Read and write WAV files
      • 14.5.1 Wave_read Objects
      • 14.5.2 Wave_write Objects
    • 14.6 chunk -- Read IFF chunked data
    • 14.7 colorsys -- Conversions between color systems
    • 14.8 rgbimg -- Read and write ``SGI RGB'' files
    • 14.9 imghdr -- Determine the type of an image.
    • 14.10 sndhdr -- Determine type of sound file.
  • image-plus15. Cryptographic Services
    • 15.1 md5 -- MD5 message digest algorithm
    • 15.2 sha -- SHA message digest algorithm
    • 15.3 mpz -- GNU arbitrary magnitude integers
    • 15.4 rotor -- Enigma-like encryption and decryption.
  • image-plus16. SGI IRIX Specific Services
    • image-plus16.1 al -- Audio functions on the SGI
      • 16.1.1 Configuration Objects
      • 16.1.2 Port Objects
    • 16.2 AL -- Constants used with the al module
    • image-plus16.3 cd -- CD-ROM access on SGI systems
      • 16.3.1 Player Objects
      • 16.3.2 Parser Objects
    • image-plus16.4 fl -- FORMS library interface for GUI applications
      • 16.4.1 Functions Defined in Module fl
      • 16.4.2 Form Objects
      • 16.4.3 FORMS Objects
    • 16.5 FL -- Constants used with the fl module
    • 16.6 flp -- Functions for loading stored FORMS designs
    • 16.7 fm -- Font Manager interface
    • 16.8 gl -- Graphics Library interface
    • 16.9 DEVICE -- Constants used with the gl module
    • 16.10 GL -- Constants used with the gl module
    • 16.11 imgfile -- Support for SGI imglib files
    • 16.12 jpeg -- Read and write JPEG files
  • image-plus17. SunOS Specific Services
    • image-plus17.1 sunaudiodev -- Access to Sun audio hardware
      • 17.1.1 Audio Device Objects
    • 17.2 SUNAUDIODEV -- Constants used with sunaudiodev
  • image-plus18. MS Windows Specific Services
    • image-plus18.1 msvcrt - Useful routines from the MS VC++ runtime
      • 18.1.1 File Operations
      • 18.1.2 Console I/O
      • 18.1.3 Other Functions
    • 18.2 winsound -- Sound-playing interface for Windows
  • image-plus19. Undocumented Modules
    • 19.1 Frameworks
    • 19.2 Miscellaneous useful utilities
    • 19.3 Platform specific modules
    • 19.4 Multimedia
    • 19.5 Obsolete
    • 19.6 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
    • 4.2 Deprecation of String 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
  • 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 Unicode Objects
      • 7.2.3 Buffer Objects
      • 7.2.4 Tuple Objects
      • 7.2.5 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 Module Objects
      • 7.5.3 CObjects
  • image-plus8. Initialization, Finalization, and Threads
    • 8.1 Thread State and the Global Interpreter Lock
  • image-plus9. Memory Management
    • 9.1 Overview
    • 9.2 Memory Interface
    • 9.3 Examples
  • image-plus10. Defining New Object Types
    • 10.1 Common Object Structures
    • 10.2 Mapping Object Structures
    • 10.3 Number Object Structures
    • 10.4 Sequence Object Structures
    • 10.5 Buffer Object Structures
  • Index
  • About this document ...
  • Front Matter
  • Contents
  • image-plus1. Extending Python with C or C++
    • 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++
    • 1.12 Providing a C API for an Extension Module
  • image-plus2. Building C and C++ Extensions on Unix
    • 2.1 Building Custom Interpreters
    • 2.2 Module Definition Options
    • 2.3 Example
    • 2.4 Distributing your extension modules
  • image-plus3. Building C and C++ Extensions on Windows
    • 3.1 A Cookbook Approach
    • 3.2 Differences Between Unix and Windows
    • 3.3 Using DLLs in Practice
  • image-plus4. Embedding Python in Another Application
    • 4.1 Embedding Python in C++
  • About this document ...
  • __builtin__
  • __main__
  • aifc
  • AL (IRIX)
  • al (IRIX)
  • anydbm
  • array
  • asyncore
  • audioop
  • base64
  • BaseHTTPServer
  • Bastion
  • binascii
  • binhex
  • bisect
  • bsddb (Unix, Windows)
  • calendar
  • cd (IRIX)
  • cgi
  • CGIHTTPServer (Unix)
  • chunk
  • cmath
  • cmd
  • code
  • codecs
  • codeop
  • colorsys
  • commands (Unix)
  • compileall
  • ConfigParser
  • copy
  • copy_reg
  • cPickle
  • crypt (Unix)
  • cStringIO
  • ctb (Mac)
  • curses
  • dbhash (Unix, Windows)
  • dbm (Unix)
  • DEVICE (IRIX)
  • dircache
  • dis
  • dl (Unix)
  • dumbdbm
  • EasyDialogs (Mac)
  • errno
  • exceptions
  • fcntl (Unix)
  • filecmp
  • fileinput
  • findertools (Mac)
  • FL (IRIX)
  • fl (IRIX)
  • flp (IRIX)
  • fm (IRIX)
  • fnmatch
  • formatter
  • fpformat
  • FrameWork (Mac)
  • ftplib
  • gdbm (Unix)
  • getopt
  • getpass
  • GL (IRIX)
  • gl (IRIX)
  • glob
  • gopherlib
  • grp (Unix)
  • gzip
  • htmlentitydefs
  • htmllib
  • httplib
  • ic (Mac)
  • imageop
  • imaplib
  • imgfile (IRIX)
  • imghdr
  • imp
  • jpeg (IRIX)
  • keyword
  • linecache
  • locale
  • mac (Mac)
  • macconsole (Mac)
  • macdnr (Mac)
  • macfs (Mac)
  • MacOS (Mac)
  • macostools (Mac)
  • macpath
  • macspeech (Mac)
  • mactcp (Mac)
  • mailbox
  • mailcap
  • marshal
  • math
  • md5
  • mhlib
  • mimetools
  • mimetypes
  • MimeWriter
  • mimify
  • MiniAEFrame (Mac)
  • mpz
  • msvcrt (Windows)
  • multifile
  • mutex
  • netrc
  • new
  • nis (UNIX)
  • nntplib
  • operator
  • os.path
  • os
  • parser
  • pdb
  • pickle
  • pipes (Unix)
  • popen2 (Unix)
  • poplib
  • posix (Unix)
  • posixfile (Unix)
  • pprint
  • profile
  • pstats
  • pty (IRIX, Linux)
  • pwd (Unix)
  • py_compile
  • pyclbr
  • Queue
  • quopri
  • random
  • re
  • regex
  • regsub
  • repr
  • resource (Unix)
  • rexec
  • rfc822
  • rgbimg
  • rlcompleter
  • robotparser
  • rotor
  • sched
  • select
  • sgmllib
  • sha
  • shelve
  • shlex
  • shutil
  • signal
  • SimpleHTTPServer
  • site
  • smtplib
  • sndhdr
  • socket
  • SocketServer
  • stat
  • statcache
  • statvfs
  • string
  • StringIO
  • struct
  • sunau
  • SUNAUDIODEV (SunOS)
  • sunaudiodev (SunOS)
  • symbol
  • sys
  • syslog (Unix)
  • tabnanny
  • telnetlib
  • tempfile
  • TERMIOS (Unix)
  • termios (Unix)
  • thread
  • threading
  • time
  • token
  • tokenize
  • traceback
  • tty (Unix)
  • types
  • urllib
  • urlparse
  • user
  • UserDict
  • UserList
  • UserString
  • uu
  • wave
  • whichdb
  • whrandom
  • winsound (Windows)
  • xdrlib
  • xmllib
  • zlib

Website

PEPs

Newsgroups

Advanced search

Package index

Browse the tree of packages

Issue tracker

  • A