pyto_runtime¶
This is the Python API for PytoRuntime, usable from the runtime itself to manage other versions or interpreters.
Interpreter¶
APIs for running and debugging scripts.
Returns the current thread's active interpreter or throws a |
|
|
|
Embedded Python version to load. |
|
Indicates whether a script is running under this interpreter. |
|
The working directory. |
|
The home URL of a virtual environment that is entered when running a script. |
|
The standard output text stream. |
|
The standard error text stream. |
|
The standard input text stream. |
|
Function responsible of presenting an UI. |
|
Function responsible of showing images from PIL, Matplotlib or OpenCV. |
|
The builtins module. |
|
Breakpoints to set before running a script with debug enabled. |
|
Called when a breakpoint is hit and the REPL is entered. |
|
If set, expressions in the executed script will pass the string representation of their result to this block. |
|
if set, a tracer will call this block every time a line of code is about to be executed. |
|
Evaluates an expression and returns its result wrapped in a |
|
Executes code and returns a new global namespace in which it was executed, wrapped in a |
|
Imports a module and returns it wrapped in a |
|
Runs a script. |
|
Runs the REPL. |
|
Runs the shell. |
|
Runs code. |
|
Sends a signal the interpreter's main thread and to its pseudo subprocesses threads. |
|
Raises an |
|
Clears the state of the interpreter. |
|
If a curses script is executing through curses.wrapper in this interpreter, this function sets the global terminal instance. |
|
A class wrapping a Python object from |
|
An exception raised from an |
|
Version¶
APIs for loading Python versions.
Returns a list of Python versions installed in a bundle. |
|
A Python version. |
|
The path of the Python framework bundle. |
|
The bundle in which the Python version was found. |
|
The Python '<major>.<minor>.<micro>' version string retrieved from Info.plist. |
|
The full version string (fetched from full_version.txt in the framework bundle). |
|
Major version. |
|
Minor version. |
|
Micro release. |
|
Alpha release. |
|
Beta release. |
|
Rc release. |
|
Indicates whether the version was compiled from an end of life branch. |
Debugging¶
Classes for debugging.
Represents a breakpoint. |
|
The script paht. |
|
The line number. |
|
Indicates whether the breakpoint should be triggered or not. |
|
The contents of the line. |
|
A serialized traceback. |
|
A string describing the type of the exception. |
|
The receiver's message string. |
|
A pre-loaded list containing every frame serialized as |
|
The stack trace as a string. |
|
If |
|
If |
|
If |
|
If |
|
A serialized frame from a |
|
The file path. |
|
The line number. |
|
The contents of the line. |
|
The name of the current function or namespace. |
|
The index in relation to its sibling frames. |
|
A reference to the globals dictionary wrapped in a |
|
A reference to the locals dictionary wrapped in a |
Swift Extensions¶
Classes for working with Swift Extensions.
pyto_runtime.SwiftFinder is automatically added to sys.meta_path by every interpreter.
See Extensions for more information.
A type representing an |
|
A meta path finder for finding Swift modules registered by the interpreter. |
|
A module loader for importing Swift modules registered by the interpreter. |