[ome-devel] Calling the importer from Python

Aleksandra Tarkowska (Staff) A.Tarkowska at dundee.ac.uk
Mon May 11 22:47:08 BST 2015


Hi Niko,

I am affraid that is the way to do it. Please see similar thread

http://lists.openmicroscopy.org.uk/pipermail/ome-devel/2014-September/002982.html


Kind regards
Ola

> On 11 May 2015, at 21:45, Niko Ehrenfeuchter <nikolaus.ehrenfeuchter at unibas.ch> wrote:
>
> 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
> _______________________________________________
> ome-devel mailing list
> ome-devel at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel

The University of Dundee is a registered Scottish Charity, No: SC015096


More information about the ome-devel mailing list