question

BillS avatar image
BillS asked BillS posted

Getting interpreter.execute() stdout prior to result?

When executing commands on the TclInterpreter, is there any way to get the stdout prior to the completion of the result?

 

Eg, I have:

 

IInterpreterResult result = tclInterpreter.execute(command);

 

But the command it's running may take several minutes to complete, and I'd like to display stdout while it's running, rather than wait for the result at the end.

 

I'm guessing this is where model.addListener() would come in, so that's where I'm going to dig. But if there any any examples/general thoughts I should be looking at first, that'd be handy.

 

Thanks,

-Bill

 

 

iTestsdk
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
PaulD avatar image
PaulD answered PaulD posted

Unfortunately, no.  The problem is that we are working with a remote Tcl interpreter running in a separate process.  We have to hook the STDOUT and STDERR from that process, but Tcl makes that problematic because of its own output mixed with output from the DLLs that it invokes.  We have built on top of the same kind of model used for remote debugging of Tcl.  All of this information is packaged up and sent back to iTest when the statement being processed completes.  We can't really stream it as it happens.

10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.