Class Module
Access to python modules
Inherited Members
Namespace: DesignData.SDS2.Python
Assembly: DesignData.SDS2.Python.dll
Syntax
public sealed class Module
Constructors
Module()
Access to python modules
Declaration
public Module()
Methods
~Module()
Access to python modules
Declaration
protected ~Module()
Import(string)
Import a python module and return that module. You can then reference classes inside the module:
Declaration
public static dynamic Import(string module)
Parameters
Type | Name | Description |
---|---|---|
string | module |
Returns
Type | Description |
---|---|
dynamic |
Examples
dynamic module = Python.Module.Import("my_module");
dynamic cls_instance = module.MyClass("an argument for the constructor");
Exceptions
Type | Condition |
---|---|
PythonException | If the module doesn't exist, or can't be imported, a python exception may occur and will be translated to PythonException |