neulab/docprompting-conala huggingface dataset:
sys.setdlopenflags(n)  
Set the flags used by the interpreter for dlopen() calls, such as when the interpreter loads extension modules. Among other things, this will enable a lazy resolving of symbols when importing a module, if called as sys.setdlopenflags(0). To share symbols across extension modules, call as sys.setdlopenflags(os.RTLD_GLOBAL). Symbolic names for the flag values can be found in the os module (RTLD_xxx constants, e.g. os.RTLD_LAZY). Availability: Unix.
sys.setprofile(profilefunc)  
Set the system’s profile function, which allows you to implement a Python source code profiler in Python. See chapter The Python Profilers for more information on the Python profiler. The system’s profile function is called similarly to the system’s trace function (see settrace()), but it is called with different events, for example it isn’t called for each executed line of code (only on call and return, but the return event is reported even when an exception has been set). The function is thread-specific, but there is no way for the profiler to know about context switches between threads, so it does not make sense to use this in the presence of multiple threads. Also, its return value is not used, so it can simply return None. Error in the profile function will cause itself unset. Profile functions should have three arguments: frame, event, and arg. frame is the current stack frame. event is a string: 'call', 'return', 'c_call', 'c_return', or 'c_exception'. arg depends on the event type. Raises an auditing event sys.setprofile with no arguments. The events have the following meaning:  
'call' 

A function is called (or some other code block entered). The profile function is called; arg is None.  
'return' 

A function (or other code block) is about to return. The profile function is called; arg is the value that will be returned, or None if the event is caused by an exception being raised.  
'c_call' 

A C function is about to be called. This may be an extension function or a built-in. arg is the C function object.  
'c_return' 

A C function has returned. arg is the C function object.  
'c_exception' 

A C function has raised an exception. arg is the C function object.
sys.setrecursionlimit(limit)  
Set the maximum depth of the Python interpreter stack to limit. This limit prevents infinite recursion from causing an overflow of the C stack and crashing Python. The highest possible limit is platform-dependent. A user may need to set the limit higher when they have a program that requires deep recursion and a platform that supports a higher limit. This should be done with care, because a too-high limit can lead to a crash. If the new limit is too low at the current recursion depth, a RecursionError exception is raised.  Changed in version 3.5.1: A RecursionError exception is now raised if the new limit is too low at the current recursion depth.
sys.setswitchinterval(interval)  
Set the interpreter’s thread switch interval (in seconds). This floating-point value determines the ideal duration of the “timeslices” allocated to concurrently running Python threads. Please note that the actual value can be higher, especially if long-running internal functions or methods are used. Also, which thread becomes scheduled at the end of the interval is the operating system’s decision. The interpreter doesn’t have its own scheduler.  New in version 3.2.
sys.set_asyncgen_hooks(firstiter, finalizer)  
Accepts two optional keyword arguments which are callables that accept an asynchronous generator iterator as an argument. The firstiter callable will be called when an asynchronous generator is iterated for the first time. The finalizer will be called when an asynchronous generator is about to be garbage collected. Raises an auditing event sys.set_asyncgen_hooks_firstiter with no arguments. Raises an auditing event sys.set_asyncgen_hooks_finalizer with no arguments. Two auditing events are raised because the underlying API consists of two calls, each of which must raise its own event.  New in version 3.6: See PEP 525 for more details, and for a reference example of a finalizer method see the implementation of asyncio.Loop.shutdown_asyncgens in Lib/asyncio/base_events.py   Note This function has been added on a provisional basis (see PEP 411 for details.)
sys.set_coroutine_origin_tracking_depth(depth)  
Allows enabling or disabling coroutine origin tracking. When enabled, the cr_origin attribute on coroutine objects will contain a tuple of (filename, line number, function name) tuples describing the traceback where the coroutine object was created, with the most recent call first. When disabled, cr_origin will be None. To enable, pass a depth value greater than zero; this sets the number of frames whose information will be captured. To disable, pass set depth to zero. This setting is thread-specific.  New in version 3.7.   Note This function has been added on a provisional basis (see PEP 411 for details.) Use it only for debugging purposes.
sys.stdin  
sys.stdout  
sys.stderr  
File objects used by the interpreter for standard input, output and errors:  
stdin is used for all interactive input (including calls to input()); 
stdout is used for the output of print() and expression statements and for the prompts of input(); The interpreter’s own prompts and its error messages go to stderr.  These streams are regular text files like those returned by the open() function. Their parameters are chosen as follows:  
The character encoding is platform-dependent. Non-Windows platforms use the locale encoding (see locale.getpreferredencoding()). On Windows, UTF-8 is used for the console device. Non-character devices such as disk files and pipes use the system locale encoding (i.e. the ANSI codepage). Non-console character devices such as NUL (i.e. where isatty() returns True) use the value of the console input and output codepages at startup, respectively for stdin and stdout/stderr. This defaults to the system locale encoding if the process is not initially attached to a console. The special behaviour of the console can be overridden by setting the environment variable PYTHONLEGACYWINDOWSSTDIO before starting Python. In that case, the console codepages are used as for any other character device. Under all platforms, you can override the character encoding by setting the PYTHONIOENCODING environment variable before starting Python or by using the new -X utf8 command line option and PYTHONUTF8 environment variable. However, for the Windows console, this only applies when PYTHONLEGACYWINDOWSSTDIO is also set.  When interactive, the stdout stream is line-buffered. Otherwise, it is block-buffered like regular text files. The stderr stream is line-buffered in both cases. You can make both streams unbuffered by passing the -u command-line option or setting the PYTHONUNBUFFERED environment variable.   Changed in version 3.9: Non-interactive stderr is now line-buffered instead of fully buffered.   Note To write or read binary data from/to the standard streams, use the underlying binary buffer object. For example, to write bytes to stdout, use sys.stdout.buffer.write(b'abc'). However, if you are writing a library (and do not control in which context its code will be executed), be aware that the standard streams may be replaced with file-like objects like io.StringIO which do not support the buffer attribute.
sys.thread_info  
A named tuple holding information about the thread implementation.   
Attribute Explanation   
name 
Name of the thread implementation:  
'nt': Windows threads 
'pthread': POSIX threads 
'solaris': Solaris threads    
lock 
Name of the lock implementation:  
'semaphore': a lock uses a semaphore 
'mutex+cond': a lock uses a mutex and a condition variable 
None if this information is unknown    
version Name and version of the thread library. It is a string, or None if this information is unknown.    New in version 3.3.
sys.tracebacklimit  
When this variable is set to an integer value, it determines the maximum number of levels of traceback information printed when an unhandled exception occurs. The default is 1000. When set to 0 or less, all traceback information is suppressed and only the exception type and value are printed.
sys.unraisablehook(unraisable, /)  
Handle an unraisable exception. Called when an exception has occurred but there is no way for Python to handle it. For example, when a destructor raises an exception or during garbage collection (gc.collect()). The unraisable argument has the following attributes:  
exc_type: Exception type. 
exc_value: Exception value, can be None. 
exc_traceback: Exception traceback, can be None. 
err_msg: Error message, can be None. 
object: Object causing the exception, can be None.  The default hook formats err_msg and object as: f'{err_msg}: {object!r}'; use “Exception ignored in” error message if err_msg is None. sys.unraisablehook() can be overridden to control how unraisable exceptions are handled. Storing exc_value using a custom hook can create a reference cycle. It should be cleared explicitly to break the reference cycle when the exception is no longer needed. Storing object using a custom hook can resurrect it if it is set to an object which is being finalized. Avoid storing object after the custom hook completes to avoid resurrecting objects. See also excepthook() which handles uncaught exceptions.
Raise an auditing event sys.unraisablehook with arguments hook, unraisable when an exception that cannot be handled occurs. The unraisable object is the same as what will be passed to the hook. If no hook has been set, hook may be None.  New in version 3.8.
sys.version  
A string containing the version number of the Python interpreter plus additional information on the build number and compiler used. This string is displayed when the interactive interpreter is started. Do not extract version information out of it, rather, use version_info and the functions provided by the platform module.
sys.version_info  
A tuple containing the five components of the version number: major, minor, micro, releaselevel, and serial. All values except releaselevel are integers; the release level is 'alpha', 'beta', 'candidate', or 'final'. The version_info value corresponding to the Python version 2.0 is (2, 0, 0, 'final', 0). The components can also be accessed by name, so sys.version_info[0] is equivalent to sys.version_info.major and so on.  Changed in version 3.1: Added named component attributes.
sys.warnoptions  
This is an implementation detail of the warnings framework; do not modify this value. Refer to the warnings module for more information on the warnings framework.
sys.winver  
The version number used to form registry keys on Windows platforms. This is stored as string resource 1000 in the Python DLL. The value is normally the first three characters of version. It is provided in the sys module for informational purposes; modifying this value has no effect on the registry keys used by Python. Availability: Windows.
sys._clear_type_cache()  
Clear the internal type cache. The type cache is used to speed up attribute and method lookups. Use the function only to drop unnecessary references during reference leak debugging. This function should be used for internal and specialized purposes only.
sys._current_frames()  
Return a dictionary mapping each thread’s identifier to the topmost stack frame currently active in that thread at the time the function is called. Note that functions in the traceback module can build the call stack given such a frame. This is most useful for debugging deadlock: this function does not require the deadlocked threads’ cooperation, and such threads’ call stacks are frozen for as long as they remain deadlocked. The frame returned for a non-deadlocked thread may bear no relationship to that thread’s current activity by the time calling code examines the frame. This function should be used for internal and specialized purposes only. Raises an auditing event sys._current_frames with no arguments.
sys._debugmallocstats()  
Print low-level information to stderr about the state of CPython’s memory allocator. If Python is configured –with-pydebug, it also performs some expensive internal consistency checks.  New in version 3.3.   CPython implementation detail: This function is specific to CPython. The exact output format is not defined here, and may change.
sys._enablelegacywindowsfsencoding()  
Changes the default filesystem encoding and errors mode to ‘mbcs’ and ‘replace’ respectively, for consistency with versions of Python prior to 3.6. This is equivalent to defining the PYTHONLEGACYWINDOWSFSENCODING environment variable before launching Python. Availability: Windows.  New in version 3.6: See PEP 529 for more details.
sys._getframe([depth])  
Return a frame object from the call stack. If optional integer depth is given, return the frame object that many calls below the top of the stack. If that is deeper than the call stack, ValueError is raised. The default for depth is zero, returning the frame at the top of the call stack. Raises an auditing event sys._getframe with no arguments.  CPython implementation detail: This function should be used for internal and specialized purposes only. It is not guaranteed to exist in all implementations of Python.
sys._xoptions  
A dictionary of the various implementation-specific flags passed through the -X command-line option. Option names are either mapped to their values, if given explicitly, or to True. Example: $ ./python -Xa=b -Xc
Python 3.2a3+ (py3k, Oct 16 2010, 20:14:50)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys._xoptions
{'a': 'b', 'c': True}
  CPython implementation detail: This is a CPython-specific way of accessing options passed through -X. Other implementations may export them through other means, or not at all.   New in version 3.2.
sys.__breakpointhook__  
sys.__displayhook__  
sys.__excepthook__  
sys.__unraisablehook__  
These objects contain the original values of breakpointhook, displayhook, excepthook, and unraisablehook at the start of the program. They are saved so that breakpointhook, displayhook and excepthook, unraisablehook can be restored in case they happen to get replaced with broken or alternative objects.  New in version 3.7: __breakpointhook__   New in version 3.8: __unraisablehook__
sys.__interactivehook__  
When this attribute exists, its value is automatically called (with no arguments) when the interpreter is launched in interactive mode. This is done after the PYTHONSTARTUP file is read, so that you can set this hook there. The site module sets this.
Raises an auditing event cpython.run_interactivehook with the hook object as the argument when the hook is called on startup.  New in version 3.4.
sys.__stdin__  
sys.__stdout__  
sys.__stderr__  
These objects contain the original values of stdin, stderr and stdout at the start of the program. They are used during finalization, and could be useful to print to the actual standard stream no matter if the sys.std* object has been redirected. It can also be used to restore the actual files to known working file objects in case they have been overwritten with a broken object. However, the preferred way to do this is to explicitly save the previous stream before replacing it, and restore the saved object.  Note Under some conditions stdin, stdout and stderr as well as the original values __stdin__, __stdout__ and __stderr__ can be None. It is usually the case for Windows GUI apps that aren’t connected to a console and Python apps started with pythonw.
sysconfig.get_config_h_filename()  
Return the path of pyconfig.h.
sysconfig.get_config_var(name)  
Return the value of a single variable name. Equivalent to get_config_vars().get(name). If name is not found, return None.
sysconfig.get_config_vars(*args)  
With no arguments, return a dictionary of all configuration variables relevant for the current platform. With arguments, return a list of values that result from looking up each argument in the configuration variable dictionary. For each argument, if the value is not found, return None.
sysconfig.get_makefile_filename()  
Return the path of Makefile.
sysconfig.get_path(name[, scheme[, vars[, expand]]])  
Return an installation path corresponding to the path name, from the install scheme named scheme. name has to be a value from the list returned by get_path_names(). sysconfig stores installation paths corresponding to each path name, for each platform, with variables to be expanded. For instance the stdlib path for the nt scheme is: {base}/Lib. get_path() will use the variables returned by get_config_vars() to expand the path. All variables have default values for each platform so one may call this function and get the default value. If scheme is provided, it must be a value from the list returned by get_scheme_names(). Otherwise, the default scheme for the current platform is used. If vars is provided, it must be a dictionary of variables that will update the dictionary return by get_config_vars(). If expand is set to False, the path will not be expanded using the variables. If name is not found, return None.
sysconfig.get_paths([scheme[, vars[, expand]]])  
Return a dictionary containing all installation paths corresponding to an installation scheme. See get_path() for more information. If scheme is not provided, will use the default scheme for the current platform. If vars is provided, it must be a dictionary of variables that will update the dictionary used to expand the paths. If expand is set to false, the paths will not be expanded. If scheme is not an existing scheme, get_paths() will raise a KeyError.
sysconfig.get_path_names()  
Return a tuple containing all path names currently supported in sysconfig.
sysconfig.get_platform()  
Return a string that identifies the current platform. This is used mainly to distinguish platform-specific build directories and platform-specific built distributions. Typically includes the OS name and version and the architecture (as supplied by ‘os.uname()’), although the exact information included depends on the OS; e.g., on Linux, the kernel version isn’t particularly important. Examples of returned values:  linux-i586 linux-alpha (?) solaris-2.6-sun4u  Windows will return one of:  win-amd64 (64bit Windows on AMD64, aka x86_64, Intel64, and EM64T) win32 (all others - specifically, sys.platform is returned)  Mac OS X can return:  macosx-10.6-ppc macosx-10.4-ppc64 macosx-10.3-i386 macosx-10.4-fat  For other non-POSIX platforms, currently just returns sys.platform.
sysconfig.get_python_version()  
Return the MAJOR.MINOR Python version number as a string. Similar to '%d.%d' % sys.version_info[:2].
sysconfig.get_scheme_names()  
Return a tuple containing all schemes currently supported in sysconfig.
sysconfig.is_python_build()  
Return True if the running Python interpreter was built from source and is being run from its built location, and not from a location resulting from e.g. running make install or installing via a binary installer.
sysconfig.parse_config_h(fp[, vars])  
Parse a config.h-style file. fp is a file-like object pointing to the config.h-like file. A dictionary containing name/value pairs is returned. If an optional dictionary is passed in as the second argument, it is used instead of a new dictionary, and updated with the values read in the file.
syslog.closelog()  
Reset the syslog module values and call the system library closelog(). This causes the module to behave as it does when initially imported. For example, openlog() will be called on the first syslog() call (if openlog() hasn’t already been called), and ident and other openlog() parameters are reset to defaults. Raises an auditing event syslog.closelog with no arguments.
syslog.openlog([ident[, logoption[, facility]]])  
Logging options of subsequent syslog() calls can be set by calling openlog(). syslog() will call openlog() with no arguments if the log is not currently open. The optional ident keyword argument is a string which is prepended to every message, and defaults to sys.argv[0] with leading path components stripped. The optional logoption keyword argument (default is 0) is a bit field – see below for possible values to combine. The optional facility keyword argument (default is LOG_USER) sets the default facility for messages which do not have a facility explicitly encoded. Raises an auditing event syslog.openlog with arguments ident, logoption, facility.  Changed in version 3.2: In previous versions, keyword arguments were not allowed, and ident was required. The default for ident was dependent on the system libraries, and often was python instead of the name of the Python program file.
syslog.setlogmask(maskpri)  
Set the priority mask to maskpri and return the previous mask value. Calls to syslog() with a priority level not set in maskpri are ignored. The default is to log all priorities. The function LOG_MASK(pri) calculates the mask for the individual priority pri. The function LOG_UPTO(pri) calculates the mask for all priorities up to and including pri. Raises an auditing event syslog.setlogmask with argument maskpri.
syslog.syslog(message)  
syslog.syslog(priority, message)  
Send the string message to the system logger. A trailing newline is added if necessary. Each message is tagged with a priority composed of a facility and a level. The optional priority argument, which defaults to LOG_INFO, determines the message priority. If the facility is not encoded in priority using logical-or (LOG_INFO | LOG_USER), the value given in the openlog() call is used. If openlog() has not been called prior to the call to syslog(), openlog() will be called with no arguments. Raises an auditing event syslog.syslog with arguments priority, message.
exception SystemError  
Raised when the interpreter finds an internal error, but the situation does not look so serious to cause it to abandon all hope. The associated value is a string indicating what went wrong (in low-level terms). You should report this to the author or maintainer of your Python interpreter. Be sure to report the version of the Python interpreter (sys.version; it is also printed at the start of an interactive Python session), the exact error message (the exception’s associated value) and if possible the source of the program that triggered the error.
exception SystemExit  
This exception is raised by the sys.exit() function. It inherits from BaseException instead of Exception so that it is not accidentally caught by code that catches Exception. This allows the exception to properly propagate up and cause the interpreter to exit. When it is not handled, the Python interpreter exits; no stack traceback is printed. The constructor accepts the same optional argument passed to sys.exit(). If the value is an integer, it specifies the system exit status (passed to C’s exit() function); if it is None, the exit status is zero; if it has another type (such as a string), the object’s value is printed and the exit status is one. A call to sys.exit() is translated into an exception so that clean-up handlers (finally clauses of try statements) can be executed, and so that a debugger can execute a script without running the risk of losing control. The os._exit() function can be used if it is absolutely positively necessary to exit immediately (for example, in the child process after a call to os.fork()).  
code  
The exit status or error message that is passed to the constructor. (Defaults to None.)
code  
The exit status or error message that is passed to the constructor. (Defaults to None.)
exception TabError  
Raised when indentation contains an inconsistent use of tabs and spaces. This is a subclass of IndentationError.