Class GenericImportModule.genericimporter
Generic importer, bases on PEP 302 and the IronPython zipimporter module
Inheritance
System.Object
GenericImportModule.genericimporter
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Simplic.Dlr
Assembly: Simplic.Dlr.dll
Syntax
public class genericimporter
Constructors
| Improve this Doc View Sourcegenericimporter()
Declaration
public genericimporter()
genericimporter(CodeContext, Object, IDictionary<Object, Object>)
Declaration
public genericimporter(CodeContext context, object pathObj, IDictionary<object, object> kwArgs)
Parameters
Type | Name | Description |
---|---|---|
CodeContext | context | |
System.Object | pathObj | |
System.Collections.Generic.IDictionary<System.Object, System.Object> | kwArgs |
Fields
| Improve this Doc View SourceGenericImporterError
Declaration
public static PythonType GenericImporterError
Field Value
Type | Description |
---|---|
PythonType |
Methods
| Improve this Doc View Source__repr__()
OBject representation
Declaration
public string __repr__()
Returns
Type | Description |
---|---|
System.String | repr as string |
find_module(CodeContext, String, Object[])
Find module for importing. If a resolver is set, the current module should be used
Declaration
public object find_module(CodeContext context, string fullname, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
CodeContext | context | |
System.String | fullname | |
System.Object[] | args |
Returns
Type | Description |
---|---|
System.Object | If resolver is not null, this will be returned, else null |
get_code(CodeContext, String)
Declaration
public string get_code(CodeContext context, string fullname)
Parameters
Type | Name | Description |
---|---|---|
CodeContext | context | |
System.String | fullname |
Returns
Type | Description |
---|---|
System.String |
get_data(CodeContext, String)
Declaration
public string get_data(CodeContext context, string path)
Parameters
Type | Name | Description |
---|---|---|
CodeContext | context | |
System.String | path |
Returns
Type | Description |
---|---|
System.String |
get_filename(CodeContext, String)
Declaration
public string get_filename(CodeContext context, string fullname)
Parameters
Type | Name | Description |
---|---|---|
CodeContext | context | |
System.String | fullname |
Returns
Type | Description |
---|---|
System.String |
get_source(CodeContext, String)
Get source ccode
Declaration
public string get_source(CodeContext context, string fullname)
Parameters
Type | Name | Description |
---|---|---|
CodeContext | context | |
System.String | fullname |
Returns
Type | Description |
---|---|
System.String |
is_package(CodeContext, String)
Return True if the module specified by 'fullname' is a package and False if it isn't.
Declaration
public bool is_package(CodeContext context, string fullname)
Parameters
Type | Name | Description |
---|---|---|
CodeContext | context | CodeContext - Automatically passed by the IP-Core |
System.String | fullname | Full path to the module |
Returns
Type | Description |
---|---|
System.Boolean | True if the module is a package |
load_module(CodeContext, String)
Declaration
public object load_module(CodeContext context, string fullname)
Parameters
Type | Name | Description |
---|---|---|
CodeContext | context | |
System.String | fullname |
Returns
Type | Description |
---|---|
System.Object |
MakeValidPath(String, String)
Create complete relative path
Declaration
public string MakeValidPath(string fullname, string rel)
Parameters
Type | Name | Description |
---|---|---|
System.String | fullname | |
System.String | rel |
Returns
Type | Description |
---|---|
System.String |
PerformModuleReload(PythonContext, PythonDictionary)
Declaration
public static void PerformModuleReload(PythonContext context, PythonDictionary dict)
Parameters
Type | Name | Description |
---|---|---|
PythonContext | context | |
PythonDictionary | dict |