PyMOTW-3
  • Module Index
  • Index
  • Runtime Features

sys — System-specific Configuration¶

Purpose:Provides system-specific configuration and operations.

The sys module includes a collection of services for probing or changing the configuration of the interpreter at runtime and resources for interacting with the operating environment outside of the current program.

  • Interpreter Settings
    • Build-time Version Information
    • Interpreter Implementation
    • Command Line Options
    • Unicode Defaults
    • Interactive Prompts
    • Display Hook
    • Install Location
  • Runtime Environment
    • Command Line Arguments
    • Input and Output Streams
    • Returning Status
  • Memory Management and Limits
    • Reference Counts
    • Object Size
    • Recursion
    • Maximum Values
    • Floating Point Values
    • Integer Values
    • Byte Ordering
  • Exception Handling
    • Unhandled Exceptions
    • Current Exception
    • Previous Interactive Exception
  • Low-level Thread Support
    • Switch Interval
    • Debugging
  • Modules and Imports
    • Imported Modules
    • Built-in Modules
    • Import Path
    • Custom Importers
    • Importing from a Shelve
    • Custom Package Importing
    • Reloading Modules in a Custom Importer
    • Handling Import Errors
    • Package Data
    • Importer Cache
    • Meta Path
  • Tracing a Program As It Runs
    • Tracing Function Calls
    • Tracing Inside Functions
    • Watching the Stack
    • Exception Propagation

See also

  • Standard library documentation for sys
  • Python 2 to 3 porting notes for sys
site — Site-wide Configuration Interpreter Settings
This page was last updated 2016-12-28.
Navigation
  • site — Site-wide Configuration
  • Interpreter Settings

Get the book

The output from all the example programs from PyMOTW-3 has been generated with Python 3.7.9, unless otherwise noted. Some of the features described here may not be available in earlier versions of Python.

Looking for examples for Python 2?

This Site

  • Module Index
  • Index
© Copyright 2021, Doug Hellmann
Creative Commons License BY-NC-SA

Other Writing

  • Blog
  • The Python Standard Library By Example