Calling Infer.NET from IronPythonThis release of Infer.NET has been tested with Iron Python 2.6 Beta 2. This development version of Iron Python is recommended in preference to the released version (2.0.2) due to its support of the with statement. This release of Infer.NET provides a wrapper in the form of a module which facilitates creating and initialising Variables and VariableArrays. The with statementAnother issue with IronPython is that the using statement does not exist and the with statement needs to be used instead. This automatically closes blocks such as the ForEachBlock, SwitchBlock, IfBlock . However, if exception handling is required within the block the context managers provided will cause the blocks to be closed anyway even if an error occurs. Normally the with statement on it's own is sufficient. A set of snippets for use with Infer.NET are also provided for implementing the Block statements using the "with statement" and also using the "closing statement" and the corresponding contextManagers. IronPython WrapperThe IronPython Wrapper "IronPythonWrapper.py" is a module consisting of a set of methods which make it easier for the IronPython user to create and initialise Variables and VariableArrays. In particular many methods need explicit type definitions which can be complex when dealing with jagged multidimensional arrays. The InitialiseTo method on variables and variableArrays can involve some very complex type definitions and hence methods are supplied to make this process easier. Similarly methods for creating complex jagged Variable Arrays are also supplied.The Wrapper consists of two classes CreateArray and InitArray which are used to create and initialise Infer.NET variables and variableArrays. The Project Template provides an instance of each of the classes which can be used to call the methods within the wrapper, Init and Create.
|


