@dynamicMemberLookup
public struct PythonInterface
An interface for Python.
PythonInterface
allows interaction with Python. It can be used to import
modules and dynamically access Python builtin types and functions.
Note
It is not intended forPythonInterface
to be initialized
directly. Instead, please use the global instance of PythonInterface
called Python
.
-
A dictionary of the Python builtins.
Declaration
public let builtins: PythonObject
-
Declaration
public func attemptImport(_ name: String) throws -> PythonObject
-
Declaration
public func `import`(_ name: String) -> PythonObject
-
Declaration
public subscript(dynamicMember name: String) -> PythonObject { get }
-
Declaration
public var version: PythonObject { get }
-
Declaration
public var versionInfo: PythonObject { get }