Documentation ¶
Index ¶
- Constants
- func Addaudithook(hook *py.Object) *py.Object
- func CallTracing(func_ *py.Object, args *py.Object) *py.Object
- func DeactivateStackTrampoline() *py.Object
- func Displayhook(object *py.Object) *py.Object
- func ExcInfo() *py.Object
- func Excepthook(exctype *py.Object, value *py.Object, traceback *py.Object) *py.Object
- func Exception() *py.Object
- func Exit(status *py.Object) *py.Object
- func GetCoroutineOriginTrackingDepth() *py.Object
- func GetIntMaxStrDigits() *py.Object
- func Getallocatedblocks() *py.Object
- func Getdefaultencoding() *py.Object
- func Getdlopenflags() *py.Object
- func Getfilesystemencodeerrors() *py.Object
- func Getfilesystemencoding() *py.Object
- func Getrecursionlimit() *py.Object
- func Getrefcount(object *py.Object) *py.Object
- func Getswitchinterval() *py.Object
- func Gettrace() *py.Object
- func Getunicodeinternedsize() *py.Object
- func Intern(string *py.Object) *py.Object
- func IsFinalizing() *py.Object
- func IsStackTrampolineActive() *py.Object
- func SetCoroutineOriginTrackingDepth(depth *py.Object) *py.Object
- func SetIntMaxStrDigits(maxdigits *py.Object) *py.Object
- func Setdlopenflags(flags *py.Object) *py.Object
- func Setrecursionlimit(limit *py.Object) *py.Object
- func Setswitchinterval(interval *py.Object) *py.Object
- func Unraisablehook(unraisable *py.Object) *py.Object
Constants ¶
const LLGoPackage = "py.sys"
Variables ¶
This section is empty.
Functions ¶
func CallTracing ¶
Call func(*args), while tracing is enabled.
The tracing state is saved, and restored afterwards. This is intended to be called from a debugger from a checkpoint, to recursively debug some other code.
func DeactivateStackTrampoline ¶
Deactivate the current stack profiler trampoline backend.
If no stack profiler is activated, this function has no effect.
func Displayhook ¶
Print an object to sys.stdout and also save it in builtins._
func ExcInfo ¶
Return current exception information: (type, value, traceback).
Return information about the most recent exception caught by an except clause in the current stack frame or in an older stack frame.
func Excepthook ¶
Handle an exception by displaying it with a traceback on sys.stderr.
func Exception ¶
Return the current exception.
Return the most recent exception caught by an except clause in the current stack frame or in an older stack frame, or None if no such exception exists.
func Exit ¶
Exit the interpreter by raising SystemExit(status).
If the status is omitted or None, it defaults to zero (i.e., success). If the status is an integer, it will be used as the system exit status. If it is another kind of object, it will be printed and the system exit status will be one (i.e., failure).
func GetCoroutineOriginTrackingDepth ¶
Check status of origin tracking for coroutine objects in this thread.
func GetIntMaxStrDigits ¶
Return the maximum string digits limit for non-binary int<->str conversions.
func Getallocatedblocks ¶
Return the number of memory blocks currently allocated.
func Getdefaultencoding ¶
Return the current default encoding used by the Unicode implementation.
func Getdlopenflags ¶
Return the current value of the flags that are used for dlopen calls.
The flag constants are defined in the os module.
func Getfilesystemencodeerrors ¶
Return the error mode used Unicode to OS filename conversion.
func Getfilesystemencoding ¶
Return the encoding used to convert Unicode filenames to OS filenames.
func Getrecursionlimit ¶
Return the current value of the recursion limit.
The recursion limit is the maximum depth of the Python interpreter stack. This limit prevents infinite recursion from causing an overflow of the C stack and crashing Python.
func Getrefcount ¶
Return the reference count of object.
The count returned is generally one higher than you might expect, because it includes the (temporary) reference as an argument to getrefcount().
func Getswitchinterval ¶
Return the current thread switch interval; see sys.setswitchinterval().
func Gettrace ¶
Return the global debug tracing function set with sys.settrace.
See the debugger chapter in the library manual.
func Getunicodeinternedsize ¶
Return the number of elements of the unicode interned dictionary
func Intern ¶
“Intern” the given string.
This enters the string in the (global) table of interned strings whose purpose is to speed up dictionary lookups. Return the string itself or the previously interned string object with the same value.
func IsStackTrampolineActive ¶
Return *True* if a stack profiler trampoline is active.
func SetCoroutineOriginTrackingDepth ¶
Enable or disable origin tracking for coroutine objects in this thread.
Coroutine objects will track 'depth' frames of traceback information about where they came from, available in their cr_origin attribute.
Set a depth of 0 to disable.
func SetIntMaxStrDigits ¶
Set the maximum string digits limit for non-binary int<->str conversions.
func Setdlopenflags ¶
Set the flags used by the interpreter for dlopen calls.
This is used, for example, 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 modules can be found in the os module (RTLD_xxx constants, e.g. os.RTLD_LAZY).
func Setrecursionlimit ¶
Set the maximum depth of the Python interpreter stack to n.
This limit prevents infinite recursion from causing an overflow of the C stack and crashing Python. The highest possible limit is platform- dependent.
func Setswitchinterval ¶
Set the ideal thread switching delay inside the Python interpreter.
The actual frequency of switching threads can be lower if the interpreter executes long sequences of uninterruptible code (this is implementation-specific and workload-dependent).
The parameter must represent the desired switching delay in seconds A typical value is 0.005 (5 milliseconds).
func Unraisablehook ¶
Handle an unraisable exception.
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.
Types ¶
This section is empty.