Hi,
I know how to set the OMERO configuration variables.
bin/omero config set <param> <value>
bin/omero config get <param>
But I'd like to retrieve OMERO configuration variable from my python app.
can anyone help me?
BK
import omero
client = omero.client('localhost')
try:
session = client.createSession('root', 'secret')
print session.getConfigService().getConfigValue('omero.data.dir')
finally:
client.closeSession()
-bash-3.2$ omero config get OMERO_HOME
/xxx/xxx/xxx/xxxx
config = session.getConfigService()
config.getConfigValue('OMERO_HOME')
xxx/lib/python/omero_api_IConfig_ice.pyc in getConfigValue(self, key, _ctx)
88
89 def getConfigValue(self, key, _ctx=None):
---> 90 return _M_omero.api.IConfig._op_getConfigValue.invoke(self, ((key, ), _ctx))
91
92 def getConfigValue_async(self, _cb, key, _ctx=None):
SecurityViolation: exception ::omero::SecurityViolation
{
serverStackTrace = ome.conditions.SecurityViolation: Cannot read configuration: OMERO_HOME
at ome.logic.ConfigImpl.getConfigValue(ConfigImpl.java:222)
......
Return to Developer Discussion
Users browsing this forum: Google [Bot] and 0 guests