Las siguientes variables globales están disponibles globalmente.
La interfaz global de Python.
Puede importar módulos de Python y acceder a tipos y funciones integrados de Python a través de la variable global
Python
.import Python // Import modules. let os = Python.import("os") let np = Python.import("numpy") // Use builtin types and functions. let list: PythonObject = [1, 2, 3] print(Python.len(list)) // Prints 3. print(Python.type(list) == Python.list) // Prints true.
Declaración
public let Python: PythonInterface