Question
· Oct 27, 2020

Configure IRIS using Python

I am trying to configure IRIS using python. The first task I wanted to do it change the journal directory. I cannot figure out the right way to work with the Config.Journal class with python. I can get the text to query the current setting.

returnValue = dbnative.classMethodValue("Config.Journal","GetList")
print(returnValue )

But I don't see a straightforward way to parse the $List returned by GetList() I was hoping there was an easier way.

How do I

1. Query configuration parameters?

2. Set configuration parameters?

Using python?

Discussion (2)0
Log in or sign up to continue

Thanks Eduard,

I think I finally found the answer, use the correct class.  Using %SYS.Journal.System instead of Config.Journal updating and reading the setting is very easy.

 returnValue = dbnative.classMethodValue("%SYS.Journal.System","SetPrimaryDirectory","/iris/journal/")

 print("Set Primary Directory: ", returnValue )

  returnValue = dbnative.classMethodValue("%SYS.Journal.System","GetPrimaryDirectory")

  print("Get Primary Directory: ", returnValue )

Thanks for your reply.