The sys Module
The attributes of the sys module are bound to data and functions that provide information on the state of the Python interpreter or affect the interpreter directly. This section documents the most frequently used attributes of sys, in alphabetical order.
argv | The list of command-line arguments passed to the main script. |
displayhook |
In interactive sessions, the Python interpreter calls if value is not None: _ _builtin_ _._ = value print repr(value) You can rebind |
excepthook |
When an exception is not caught by any handler, and thus propagates all the way up the call stack, Python calls |
exc_info |
If the current thread ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access