[ome-devel] Calling the importer from Python

Niko Ehrenfeuchter nikolaus.ehrenfeuchter at unibas.ch
Mon May 11 21:45:12 BST 2015


Hi all,

I was wondering what the best method for calling the importer from 
within a Python script might be?

I've looked at uploadFile() from omero.util.script_utils, but in my 
understanding that's not for images - or am I wrong here?

Delusively, the most simple thing would be to use omero.plugins.import, 
but as far as I can see the plugins are not meant as modules to be 
imported in other Python scripts but rather for extending the OMERO 
command line interface.

Of course I could use popen() to call the "real" command line interface 
directly, but it feels a bit stupid calling a Python script from another 
one where all the OMERO stuff has already been set up.

My approach now would be to use the CLI class from omero.cli, but I 
wanted to know if there is a better way that I am overlooking?

Many Thanks,
~Niko
-- 
Niko Ehrenfeuchter | Image Analysis Specialist | Biozentrum, University 
of Basel | Klingelbergstr. 50/70 | CH-4056 Basel
Phone: +41 (61) 26 72673 | nikolaus.ehrenfeuchter at unibas.ch | 
www.biozentrum.unibas.ch | www.microscopynetwork.unibas.ch


More information about the ome-devel mailing list