Class codeGolf.Pyramid
{

ClassMethod BuildPython(f As %Integer) [ Language = python ]
{
for i in range(f):
    print(' ' * (f - i - 1) + '#' * (2 * i + 1))
}

/// Description: Build a pyramid of height f
ClassMethod Build(f As %Integer) As %Status
{
    Set sc = $$$OK
    For i = 1:1:f {
        set space = $tr($j("",f-i)," "," ")
        set hash = $tr($j("",2*i-1)," ","#")
        Write space_hash, !
    }
    Return sc
}

}

Hi Joe,

The 2 dots syntax is used to access the properties and methods of the current object.
You can also use $this to access the current object.

For example, if you have a class called "MyClass" and you have a property called "MyProperty" in that class, you can access the property value by using the following syntax:

User.MyClass Extends EnsLib.BusinessService
{
    Property MyProperty;

    Method MyMethod()
    {
        set ..MyProperty = 10;
        set $this.MyProperty = 10;
    }
}

In your case, you can use the following syntax to access the methods of the EnsLib.File.InboundAdapter class:

User.MyClass Extends EnsLib.BusinessService
{
    Parameter ADAPTER = "EnsLib.File.InboundAdapter";
    Property Adapter = "EnsLib.File.InboundAdapter";

    Method MyMethod()
    {
        do ..Adapter.AdapterMethod()
        do $this.Adapter.AdapterMethod()
    }
}

Hope this helps.

Just to be clear, the remove of the private web server is just for IRIS and IRIS for Health. IRIS and IRIS for Health community edition still has the private web server.

Then, the question is, what is the cost of this decision for end-developers like most of here.

I would say not that much as you think. The main raison is that most of the developer use the community edition. And the community edition still has the private web server. Then if you have an preinstalled IRIS, you will keep the private server.

The main cost is for the new developer that don't have an preinstalled IRIS and that don't want to use the community edition. I agree that installing a web server is not that easy if you sick on windows. But it is not that hard if you are on Linux or Mac.

For windows developers, may be we can provide simple installer that install a web server and configure it for IRIS.

Now, if we take a step back on the ease of use. I think, this decision is a good one, because it's the first major step of breaking down the monolith. From this point, we can start to make the product more modular. And of course, there is a lot of work to do.

I agree with you that we must improve our client libraries and drivers. Put them in direct distribution, make them more easy to use and with modern features.

This post has been edited to make use of the IRIS Embedded Python Wrapper : https://github.com/grongierisc/iris-embedded-python-wrapper.

The old version :

alias irisvenv="/opt/intersystems/iris/bin/irispython -m venv .venv; rm .venv/bin/python3; ln -s /opt/intersystems/iris/bin/irispython .venv/bin/python3; source .venv/bin/activate;"

Was in fact not working, because of the irispython interpretor that doesn't support venv yet.

To make embedded python works with venv, please use :

alias irisvenv="python3 -m venv .venv; source .venv/bin/activate; pip install https://github.com/grongierisc/iris-embedded-python-wrapper/releases/download/v0.0.1/iris-0.0.1-py3-none-any.whl"

and make sure that the environment variable named IRISINSTALLDIR is pointing to the InterSystems IRIS installation directory.

export IRISINSTALLDIR=/opt/iris

Major update :

Now this module is available on Pypi:

Install with PyPI

pip3 install iris-pex-embedded-python

Import the ObjectScript classes, open an embedded python shell and run :

from grongier.pex import Utils
Utils.setup()

Known issues

If the module is not updated, make sure to remove the old version :

pip3 uninstall iris-pex-embedded-python

or manually remove the grongier folder in <iris_installation>/lib/python/

or force the installation with pip :

pip3 install --upgrade iris-pex-embedded-python --target <iris_installation>/lib/python/

Hi,

You need to fill in some environment variables that allow you to authenticate yourself and therefore connect.

The variables are :

IRISUSERNAME
IRISPASSWORD
IRISNAMESPACE

In a docker file for example :

# environment variables for embedded python
ENV IRISUSERNAME "SuperUser"
ENV IRISPASSWORD "SYS"
ENV IRISNAMESPACE "IRISAPP"

In a shell :

export IRISUSERNAME=SuperUser
export IRISPASSWORD=SYS
export IRISNAMESPACE=IRISAPP