Skip to content

exit

exit(code?: number): never

Defined in: packages/pythonlib/src/sys.ts:131

Exit from Python (terminate the process).

Parameters

ParameterTypeDescription
code?numberOptional exit status code (default: 0 for success)

Returns

never

Throws

This function never returns; it terminates the process.

Example

exit() // Exit with success
exit(1) // Exit with error code 1