GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Front Matter
  • Contents
  • 1. Introduction
  • 2. Built-in Types, Exceptions and Functions
  • 2.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

This view

  • Original page
  • New address

GeezerVison is showing docs.python.org — Python Library Reference

Up One Level Next Page Python Library Reference Contents Module Index Index
Up: Python Documentation Index Next: Front Matter

Python Library Reference

Guido van Rossum
Fred L. Drake, Jr., editor

PythonLabs
E-mail: [email protected]

June 22, 2001
Release 2.0.1


  • Front Matter
  • Contents
  • 1. Introduction
  • 2. Built-in Types, Exceptions and Functions
    • 2.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
  • 3. Python Runtime Services
    • 3.1 sys -- System-specific parameters and functions
    • 3.2 gc -- Garbage Collector interface
    • 3.3 atexit -- Exit handlers
      • 3.3.1 atexit Example
    • 3.4 types -- Names for all built-in types
    • 3.5 UserDict -- Class wrapper for dictionary objects
    • 3.6 UserList -- Class wrapper for list objects
    • 3.7 UserString -- Class wrapper for string objects
    • 3.8 operator -- Standard operators as functions.
    • 3.9 traceback -- Print or retrieve a stack traceback
      • 3.9.1 Traceback Example
    • 3.10 linecache -- Random access to text lines
    • 3.11 pickle -- Python object serialization
      • 3.11.1 Example
    • 3.12 cPickle -- Alternate implementation of pickle
    • 3.13 copy_reg -- Register pickle support functions
    • 3.14 shelve -- Python object persistence
    • 3.15 copy -- Shallow and deep copy operations
    • 3.16 marshal -- Alternate Python object serialization
    • 3.17 imp -- Access the import internals
      • 3.17.1 Examples
    • 3.18 code -- Interpreter base classes
      • 3.18.1 Interactive Interpreter Objects
      • 3.18.2 Interactive Console Objects
    • 3.19 codeop -- Compile Python code
    • 3.20 pprint -- Data pretty printer
      • 3.20.1 PrettyPrinter Objects
    • 3.21 repr -- Alternate repr() implementation
      • 3.21.1 Repr Objects
      • 3.21.2 Subclassing Repr Objects
    • 3.22 new -- Creation of runtime internal objects
    • 3.23 site -- Site-specific configuration hook
    • 3.24 user -- User-specific configuration hook
    • 3.25 __builtin__ -- Built-in functions
    • 3.26 __main__ -- Top-level script environment
  • 4. String Services
    • 4.1 string -- Common string operations
    • 4.2 re -- 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
    • 4.3 struct -- Interpret strings as packed binary data
    • 4.4 fpformat -- Floating point conversions
    • 4.5 StringIO -- Read and write strings as files
    • 4.6 cStringIO -- Faster version of StringIO
    • 4.7 codecs -- Codec registry and base classes
      • 4.7.1 Codec Base Classes
    • 4.8 unicodedata -- Unicode Database
  • 5. Miscellaneous Services
    • 5.1 math -- Mathematical functions
    • 5.2 cmath -- Mathematical functions for complex numbers
    • 5.3 random -- Generate pseudo-random numbers
      • 5.3.1 The Random Number Generator Interface
    • 5.4 whrandom -- Pseudo-random number generator
    • 5.5 bisect -- Array bisection algorithm
      • 5.5.1 Example
    • 5.6 array -- Efficient arrays of numeric values
    • 5.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
    • 5.10 cmd -- Support for line-oriented command interpreters
      • 5.10.1 Cmd Objects
    • 5.11 shlex -- Simple lexical analysis
      • 5.11.1 shlex Objects
  • 6. Generic Operating System Services
    • 6.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 Miscellaneous 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 and Directory Comparisons
      • 6.7.1 The dircmp class
    • 6.8 popen2 -- Subprocesses with accessible I/O streams
      • 6.8.1 Popen3 and Popen4 Objects
    • 6.9 time -- Time access and conversions
    • 6.10 sched -- Event scheduler
      • 6.10.1 Scheduler Objects
    • 6.11 getpass -- Portable password input
    • 6.12 curses -- Terminal handling for character-cell displays
      • 6.12.1 Functions
      • 6.12.2 Window Objects
      • 6.12.3 Constants
    • 6.13 curses.textpad -- Text input widget for curses programs
      • 6.13.1 Textbox objects
    • 6.14 curses.wrapper -- Terminal handler for curses programs
    • 6.15 curses.ascii -- Utilities for ASCII characters
    • 6.16 getopt -- Parser for command line options
    • 6.17 tempfile -- Generate temporary file names
    • 6.18 errno -- Standard errno system symbols
    • 6.19 glob -- Unix style pathname pattern expansion
    • 6.20 fnmatch -- Unix filename pattern matching
    • 6.21 shutil -- High-level file operations
      • 6.21.1 Example
    • 6.22 locale -- Internationalization services
      • 6.22.1 Background, details, hints, tips and caveats
      • 6.22.2 For extension writers and programs that embed Python
    • 6.23 gettext -- Multilingual internationalization services
      • 6.23.1 GNU gettext API
      • 6.23.2 Class-based API
      • 6.23.3 Internationalizing your programs and modules
      • 6.23.4 Acknowledgements
  • 7. Optional Operating System Services
    • 7.1 signal -- Set handlers for asynchronous events
      • 7.1.1 Example
    • 7.2 socket -- Low-level networking interface
      • 7.2.1 Socket Objects
      • 7.2.2 Example
    • 7.3 select -- Waiting for I/O completion
      • 7.3.1 Polling Objects
    • 7.4 thread -- Multiple threads of control
    • 7.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
    • 7.6 mutex -- Mutual exclusion support
      • 7.6.1 Mutex Objects
    • 7.7 Queue -- A synchronized queue class
      • 7.7.1 Queue Objects
    • 7.8 mmap -- Memory-mapped file support
    • 7.9 anydbm -- Generic access to DBM-style databases
    • 7.10 dumbdbm -- Portable DBM implementation
    • 7.11 dbhash -- DBM-style interface to the BSD database library
      • 7.11.1 Database Objects
    • 7.12 whichdb -- Guess which DBM module created a database
    • 7.13 bsddb -- Interface to Berkeley DB library
      • 7.13.1 Hash, BTree and Record Objects
    • 7.14 zlib -- Compression compatible with gzip
    • 7.15 gzip -- Support for gzip files
    • 7.16 zipfile -- Work with ZIP archives
      • 7.16.1 ZipFile Objects
      • 7.16.2 PyZipFile Objects
      • 7.16.3 ZipInfo Objects
    • 7.17 readline -- GNU readline interface
      • 7.17.1 Example
    • 7.18 rlcompleter -- Completion function for GNU readline
      • 7.18.1 Completer Objects
  • 8. Unix Specific Services
    • 8.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
    • 8.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
    • 8.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
    • 8.13 pipes -- Interface to shell pipelines
      • 8.13.1 Template Objects
    • 8.14 posixfile -- File-like objects with locking support
    • 8.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
    • 8.18 commands -- Utilities for running commands
  • 9. The Python Debugger
    • 9.1 Debugger Commands
    • 9.2 How It Works
  • 10. 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?
    • 10.5 Reference Manual
      • 10.5.1 The Stats Class
    • 10.6 Limitations
    • 10.7 Calibration
    • 10.8 Extensions -- Deriving Better Profilers
      • 10.8.1 OldProfile Class
      • 10.8.2 HotProfile Class
  • 11. Internet Protocols and Support
    • 11.1 webbrowser -- Convenient Web-browser controller
      • 11.1.1 Browser Controller Objects
    • 11.2 cgi -- Common Gateway Interface support.
      • 11.2.1 Introduction
      • 11.2.2 Using the cgi module
      • 11.2.3 Old classes
      • 11.2.4 Functions
      • 11.2.5 Caring about security
      • 11.2.6 Installing your CGI script on a Unix system
      • 11.2.7 Testing your CGI script
      • 11.2.8 Debugging CGI scripts
      • 11.2.9 Common problems and solutions
    • 11.3 urllib -- Open arbitrary resources by URL
      • 11.3.1 URLopener Objects
      • 11.3.2 Examples
    • 11.4 httplib -- HTTP protocol client
      • 11.4.1 HTTP Objects
      • 11.4.2 Examples
    • 11.5 ftplib -- FTP protocol client
      • 11.5.1 FTP Objects
    • 11.6 gopherlib -- Gopher protocol client
    • 11.7 poplib -- POP3 protocol client
      • 11.7.1 POP3 Objects
      • 11.7.2 POP3 Example
    • 11.8 imaplib -- IMAP4 protocol client
      • 11.8.1 IMAP4 Objects
      • 11.8.2 IMAP4 Example
    • 11.9 nntplib -- NNTP protocol client
      • 11.9.1 NNTP Objects
    • 11.10 smtplib -- SMTP protocol client
      • 11.10.1 SMTP Objects
      • 11.10.2 SMTP Example
    • 11.11 telnetlib -- Telnet client
      • 11.11.1 Telnet Objects
      • 11.11.2 Telnet Example
    • 11.12 urlparse -- Parse URLs into components
    • 11.13 SocketServer -- A framework for network servers
    • 11.14 BaseHTTPServer -- Basic HTTP server
    • 11.15 SimpleHTTPServer -- Simple HTTP request handler
    • 11.16 CGIHTTPServer -- CGI-capable HTTP request handler
    • 11.17 Cookie -- HTTP state management
      • 11.17.1 Cookie Objects
      • 11.17.2 Morsel Objects
      • 11.17.3 Example
    • 11.18 asyncore -- Asynchronous socket handler
      • 11.18.1 Example basic HTTP client
  • 12. Internet Data Handling
    • 12.1 formatter -- Generic output formatting
      • 12.1.1 The Formatter Interface
      • 12.1.2 Formatter Implementations
      • 12.1.3 The Writer Interface
      • 12.1.4 Writer Implementations
    • 12.2 rfc822 -- Parse RFC 822 mail headers
      • 12.2.1 Message Objects
      • 12.2.2 AddressList Objects
    • 12.3 mimetools -- Tools for parsing MIME messages
      • 12.3.1 Additional Methods of Message Objects
    • 12.4 MimeWriter -- Generic MIME file writer
      • 12.4.1 MimeWriter Objects
    • 12.5 multifile -- Support for files containing distinct parts
      • 12.5.1 MultiFile Objects
      • 12.5.2 MultiFile Example
    • 12.6 binhex -- Encode and decode binhex4 files
      • 12.6.1 Notes
    • 12.7 uu -- Encode and decode uuencode files
    • 12.8 binascii -- Convert between binary and ASCII
    • 12.9 xdrlib -- Encode and decode XDR data
      • 12.9.1 Packer Objects
      • 12.9.2 Unpacker Objects
      • 12.9.3 Exceptions
    • 12.10 mailcap -- Mailcap file handling.
    • 12.11 mimetypes -- Map filenames to MIME types
    • 12.12 base64 -- Encode and decode MIME base64 data
    • 12.13 quopri -- Encode and decode MIME quoted-printable data
    • 12.14 mailbox -- Read various mailbox formats
      • 12.14.1 Mailbox Objects
    • 12.15 mhlib -- Access to MH mailboxes
      • 12.15.1 MH Objects
      • 12.15.2 Folder Objects
      • 12.15.3 Message Objects
    • 12.16 mimify -- MIME processing of mail messages
    • 12.17 netrc -- netrc file processing
      • 12.17.1 netrc Objects
    • 12.18 robotparser -- Parser for robots.txt
  • 13. Structured Markup Processing Tools
    • 13.1 sgmllib -- Simple SGML parser
    • 13.2 htmllib -- A parser for HTML documents
      • 13.2.1 HTMLParser Objects
    • 13.3 htmlentitydefs -- Definitions of HTML general entities
    • 13.4 xml.parsers.expat -- Fast XML parsing using the Expat library
      • 13.4.1 Example
      • 13.4.2 Expat error constants
    • 13.5 xml.sax -- Support for SAX2 parsers
      • 13.5.1 SAXException Objects
    • 13.6 xml.sax.handler -- Base classes for SAX handlers
      • 13.6.1 ContentHandler Objects
      • 13.6.2 DTDHandler Objects
      • 13.6.3 EntityResolver Objects
    • 13.7 xml.sax.saxutils -- SAX Utilities
    • 13.8 xml.sax.xmlreader -- Interface for XML parsers
      • 13.8.1 XMLReader Objects
      • 13.8.2 IncrementalParser Objects
      • 13.8.3 Locator Objects
      • 13.8.4 InputSource Objects
      • 13.8.5 AttributesImpl Objects
      • 13.8.6 AttributesNSImpl Objects
    • 13.9 xmllib -- A parser for XML documents
      • 13.9.1 XML Namespaces
  • 14. 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
    • 14.4 sunau -- Read and write Sun AU files
      • 14.4.1 AU_read Objects
      • 14.4.2 AU_write Objects
    • 14.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
  • 15. 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
  • 16. Restricted Execution
    • 16.1 rexec -- Restricted execution framework
      • 16.1.1 An example
    • 16.2 Bastion -- Restricting access to objects
  • 17. Python Language Services
    • 17.1 parser -- Access Python parse trees
      • 17.1.1 Creating AST Objects
      • 17.1.2 Converting AST Objects
      • 17.1.3 Queries on AST Objects
      • 17.1.4 Exceptions and Error Handling
      • 17.1.5 AST Objects
      • 17.1.6 Examples
    • 17.2 symbol -- Constants used with Python parse trees
    • 17.3 token -- Constants used with Python parse trees
    • 17.4 keyword -- Testing for Python keywords
    • 17.5 tokenize -- Tokenizer for Python source
    • 17.6 tabnanny -- Detection of ambiguous indentation
    • 17.7 pyclbr -- Python class browser support
      • 17.7.1 Class Descriptor Objects
    • 17.8 py_compile -- Compile Python source files
    • 17.9 compileall -- Byte-compile Python libraries
    • 17.10 dis -- Disassembler for Python byte code
      • 17.10.1 Python Byte Code Instructions
  • 18. SGI IRIX Specific Services
    • 18.1 al -- Audio functions on the SGI
      • 18.1.1 Configuration Objects
      • 18.1.2 Port Objects
    • 18.2 AL -- Constants used with the al module
    • 18.3 cd -- CD-ROM access on SGI systems
      • 18.3.1 Player Objects
      • 18.3.2 Parser Objects
    • 18.4 fl -- FORMS library interface for GUI applications
      • 18.4.1 Functions Defined in Module fl
      • 18.4.2 Form Objects
      • 18.4.3 FORMS Objects
    • 18.5 FL -- Constants used with the fl module
    • 18.6 flp -- Functions for loading stored FORMS designs
    • 18.7 fm -- Font Manager interface
    • 18.8 gl -- Graphics Library interface
    • 18.9 DEVICE -- Constants used with the gl module
    • 18.10 GL -- Constants used with the gl module
    • 18.11 imgfile -- Support for SGI imglib files
    • 18.12 jpeg -- Read and write JPEG files
  • 19. SunOS Specific Services
    • 19.1 sunaudiodev -- Access to Sun audio hardware
      • 19.1.1 Audio Device Objects
    • 19.2 SUNAUDIODEV -- Constants used with sunaudiodev
  • 20. MS Windows Specific Services
    • 20.1 msvcrt - Useful routines from the MS VC++ runtime
      • 20.1.1 File Operations
      • 20.1.2 Console I/O
      • 20.1.3 Other Functions
    • 20.2 _winreg - Windows registry access
      • 20.2.1 Registry handle objects
    • 20.3 winsound -- Sound-playing interface for Windows
  • A. Undocumented Modules
    • A.1 Frameworks
    • A.2 Miscellaneous useful utilities
    • A.3 Platform specific modules
    • A.4 Multimedia
    • A.5 Obsolete
    • A.6 SGI-specific Extension modules
  • B. Reporting Bugs
  • C. History and License
    • C.1 History of the software
    • C.2 Terms and conditions for accessing or otherwise using Python
  • Module Index
  • Index
  • About this document ...


Up One Level Next Page Python Library Reference Contents Module Index Index
Up: Python Documentation Index Next: Front Matter

See About this document... for information on suggesting changes.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.