Python - sys Functions
The sys module in Python provides access to variables used by the Python interpreter and functions for interacting with the Python runtime environment.
| Sr.No. | Function & Description |
|---|---|
1 |
Exits the program by raising the SystemExit exception. |
2 |
Returns the size of an object in bytes. |
3 |
Sets the maximum depth of the Python interpreter stack. |
4 |
Used to access the current value of the recursion limit. |
5 |
Returns a tuple of three values representing the type of the exception, the exception itself, and a traceback object |
6 |
Returns the exception instance caught by the innermost exception handler currently executing, or None if no handler is active. |
7 |
Returns the number of memory blocks currently allocated by the interpreter. |
8 |
Return the name of the current default string encoding used by the Unicode implementation. |
9 |
Returns the reference count of on object. |
10 |
Return a named tuple describing the Windows version currently running. |
11 |
Used to check whether the Python interpreter is in the process of shutting down. |
12 |
Used to set the interpreter's thread switch interval in seconds. |
13 |
Used to set the systems trace function. |