Changes between Initial Version and Version 3 of Ticket #4376


Ignore:
Timestamp:
04/12/11 09:44:45 (9 years ago)
Author:
wmoore
Comment:

When

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4376

    • Property Status changed from new to reopened
    • Property Remaining Time changed from 1 to 2
    • Property Summary changed from Scripting service to use blitz gateway to Python scripts to use blitz gateway
  • Ticket #4376 – Description

    initial v3  
    11If we can use the blitz gateway in the scripting service, then all Python API users can start in the same place - docs, API learning etc and this functionality is available to Script writers.  
    22 
    3 Need to be able to create a blitz wrapper from the 'client' object provided by the scripting service.  
     3Need to be able to create a blitz wrapper from the 'client' object provided by the scripting service #4237.  
    44 
    5 {{{ 
    6 client = script.client("Script.py",) 
    7 }}} 
    8  
    9 First attempt: 
    10 {{{ 
    11 >>> import omero 
    12 >>> c = omero.client("localhost") 
    13 >>> s = c.createSession("root", "omero") 
    14  
    15 >>> import omero.gateway 
    16 >>> from omero import client_wrapper 
    17 >>> conn = client_wrapper(client_obj=c) 
    18 Traceback (most recent call last): 
    19   File "<stdin>", line 1, in <module> 
    20   File "/Users/will/Desktop/OMERO/dist/lib/python/omero/__init__.py", line 24, in client_wrapper 
    21     return omero.gateway.BlitzGateway(*args, **kwargs) 
    22   File "/Users/will/Desktop/OMERO/dist/lib/python/omero/gateway/__init__.py", line 1156, in __init__ 
    23     self._resetOmeroClient() 
    24   File "/Users/will/Desktop/OMERO/dist/lib/python/omero/gateway/__init__.py", line 1449, in _resetOmeroClient 
    25     self.c = omero.client(pmap=['--Ice.Config='+','.join(self.ice_config)]) 
    26   File "/Users/will/Desktop/OMERO/dist/lib/python/omero/__init__.py", line 28, in client 
    27     return omero.clients.BaseClient(*args, **kwargs) 
    28   File "/Users/will/Desktop/OMERO/dist/lib/python/omero/clients.py", line 122, in __init__ 
    29     self._initData(id) 
    30   File "/Users/will/Desktop/OMERO/dist/lib/python/omero/clients.py", line 224, in _initData 
    31     self.__ic = Ice.initialize(id) 
    32   File "/opt/Ice-3.3.1/python/Ice.py", line 340, in initialize 
    33     communicator = IcePy.Communicator(args, data) 
    34 Ice.EndpointParseException: exception ::Ice::EndpointParseException 
    35 { 
    36     str = ssl  -p 4064 -h <"omero.host" not set> 
    37 } 
    38  
    39 }}} 
     5Once this is done, we can start converting some of the scripts over to blitz gateway. 
     6 - Examples (edit description etc) 
     7 - Util scripts 
     8 - At least some figure-scripts. For ones we don't have time for, maybe add comment to script in case anyone tries to copy!  

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.48159 sec.)

We're Hiring!