Task #979 (new)
Opened 11 years ago
Last modified 6 years ago
Add methods for listening to stdout/stderr on Process
| Reported by: | jamoore | Owned by: | jamoore |
|---|---|---|---|
| Priority: | major | Milestone: | Unscheduled |
| Component: | Scripting | Version: | 3.0-M1 |
| Keywords: | n.a. | Cc: | dzmacdonald, cblackburn |
| Resources: | n.a. | Referenced By: | n.a. |
| References: | n.a. | Remaining Time: | 1.0d |
| Sprint: | n.a. |
Description
For example:
Process.addStdoutListener(FileListenerPrx) Process.removeStdoutListener(FileListenerPrx) Process.addStderrListener(FileListenerPrx) Process.removeStderrListener(FileListenerPrx)
if scripts were to set their stdout/stderr mime-type (Format, with a default of "text/plain") then streaming them to, say, a web page would cause them to be loaded properly.
This could also solve the problem of generating UIs from scripts. Rather than creating a "*.html" file, the script could configure itself of html output:
script = omero.script("name","desc",...ins/outs..., stdout="text/html")
# All text printed to stdout must be html and can be viewed by listeners
print """
<html>
<head/>
<body>
%s
</body>
</html>
""" %s "hi"
A few questions:
- What methods are on FileListener? Do we allow reading by line? By self-defined block (1024b, etc.)? What about XML?
- Do attached listeners get all output, or only that since attaching?
- How many listeners are allowed and what does the performance look like?
This may should work with the OmeroFs proxies.
Change History (5)
comment:1 Changed 11 years ago by jmoore
- Milestone changed from OMERO-Beta4 to OMERO-Beta4.2
comment:2 Changed 9 years ago by jmoore
- Type changed from User Story to Task
comment:3 Changed 9 years ago by jmoore
- Remaining Time set to 1
comment:4 Changed 9 years ago by jmoore
- Milestone changed from OMERO-Beta4.2 to Unscheduled
comment:5 Changed 6 years ago by jamoore
Referencing ticket #1341 has changed sprint.
Analysis/scripting is the focus of 4.2