Category Archives: IronPython/Python

Information related to programming IronPython/Python and related areas

IronPython Documentation

December 4, 2024

The information below is aimed at IronPython 2.7.3. This is the version used for scripting in SoftPro Select. The obvious question is why don’t we update? The obvious answer is – why?

IronPython 2.7.x CLR Library Methods/Properties

December 4, 2024

I was curious about the methods exposed when you do an import clr command. The source code for ClrModule.cs is here. Methods marked as “Advanced” are highly specialized and will not be covered. Methods AddReference(string[] references) : void Add DLL to internal list of assemblies useable by code. Adds a reference to a .NET assembly. Parameters can be… Read More »

Add Exception Viewer During Select IronPython Development

April 12, 2023

It can be very difficult to get debug information when developing Python scripts in Select – especially developing Automation Code Snippets. This technique provides a welcome solution by writing error/debug information to the system Event Log. Be aware the developer MUST REMOVE the Event Log writer before releasing the code to production. Setup Add the following function to… Read More »

Loading Additional .NET Assemblies

June 1, 2020

There are times you want to add an additional .NET library to your code. It might be an actual Microsoft assembly or from another vendor. First you import CLR then add the desired assembly. (Note that the DLL must be either in the GAC or the executable folder.) Finally import the type/class namespace(s). If you want to minimize… Read More »

Properties and Methods with IronPython

December 4, 2024

This page is designed to provide examples of using .NET features in IronPython when creating Softpro Select content. The comprehensive example is here but I’ll provide examples in a form you are more familiar with. In all the code below, “order” is always the top level order object. For instance, in a custom order rule (COR), it is… Read More »