[ome-devel] Calling the importer from Python

Niko Ehrenfeuchter nikolaus.ehrenfeuchter at unibas.ch
Tue May 12 08:29:53 BST 2015


Hi again,

one more question regarding this: is there a way to create the CLI() 
object using an existing BlitzGateway connection?

I'm only asking since all the rest of my script is currently based on 
the conn object only, so it were very nice if I could simply re-use that.

Thanks
~Niko

On 12.05.2015 00:00, Niko Ehrenfeuchter wrote:
> Hi Ola,
>
> thanks for the quick response, I'll go for the omero.cli version then.
>
> The example in the thread mentioned is very helpful, btw!
>
> Best
> ~Niko
>
> On 11.05.2015 23:47, Aleksandra Tarkowska (Staff) wrote:
>> 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
>> _______________________________________________
>> ome-devel mailing list
>> ome-devel at lists.openmicroscopy.org.uk
>> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
>>
>

-- 
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