As seguintes variáveis globais estão disponíveis globalmente.
A interface global do Python.
Você pode importar módulos Python e acessar tipos e funções integrados do Python por meio da variável 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.
Declaração
public let Python: PythonInterface