Package omero.api

Interface IScript

  • All Superinterfaces:
    _IScriptOperations, _IScriptOperationsNC, _ServiceInterfaceOperations, _ServiceInterfaceOperationsNC, Ice.Object, ServiceInterface
    All Known Implementing Classes:
    _IScriptDisp, _IScriptTie

    public interface IScript
    extends Ice.Object, _IScriptOperations, _IScriptOperationsNC, ServiceInterface
    Utility service for managing and launching scripts for execution by the Processor API. Typical usage might include (PYTHON):
     
     sf = client.createSession()
     svc = sf.getScriptService()
     scripts = svc.getScripts()
    
     if len(scripts) >= 1:
     script_id = svc.keys()\[-1]
     else:
     script_id = svc.uploadScript('/test/my_script.py', SCRIPT_TEXT)
    
     params = svc.getParams(script_id)
    
     # You will need to parse the params to create the proper input
     inputs = {}
    
     # The last parameter is how long to wait as an RInt
     proc = svc.runScript(script_id, inputs, None)
     try:
     cb = omero.scripts.ProcessCallbackI(client, proc)
     while not cb.block(1000): # ms.
     pass
     cb.close()
     rv = proc.getResults(0)
     finally:
     proc.close(False)
     
     
    See OMERO.scripts for more information.