[Tcl Java] Re: [Tcl Java] TclBlend and Expect - exporting a java stream into tcl
On Thu, 18 May 2000, Peter wrote: > Hi, > > I've been using Tcl/Tk heavily for several yers, java to some extent, > and I'm Sounds like an interesting combination. I would love to read a paper about this project when you are finished. > currently investigating Expect for testing purposes. Since we will be > interfacing a bunch of simulators (separate Unix processes) and real > targets (dedicated hardware) from > the same test system as we also want to test bits and pices of java > code, > it sounds ideal to put Expect and TclBlend together (haven't tried it > yet, though). You are talking about two different things here. Expect is designed to work between processes. The Java stream you seem to be talking about would be used between two threads in the same process. > But even at this stage I forsee a problem: How do I make a stream (used > for > internal communication between two java threads) available in the tcl > environment > for Expect to listen on? Frankly, I do not understand what the "problem" is. Why don't you just split your Java process into two processes so that you can have expect interact with each of them? > As far as I understand, I really need the actaul stream in order to use > Expect. > If I do a work-around using, e.g., event generation in java, I can > implement > an Expect like behaviour within tcl. But I don't want to re-implement > Expect... > > I've tried to find similar questions in your archive, but they don't > adress > the actual exporting of a stream, thye propagate java stream output by > other means. > > Yours, > > Peter Loborg Mo DeJong Red Hat Inc. The TclJava mailing list is sponsored by Scriptics Corporation. To subscribe:send mail to [EMAIL PROTECTED] with the word SUBSCRIBE as the subject. To unsubscribe: send mail to [EMAIL PROTECTED] with the word UNSUBSCRIBE as the subject. To send to the list, send email to '[EMAIL PROTECTED]'. An archive is available at http://www.mail-archive.com/tcljava@scriptics.com
[Tcl Java] Re: [Tcl Java] TclBlend and Expect - exporting a java stream into tcl
Peter wrote: > But even at this stage I forsee a problem: How do I make a stream (used > for > internal communication between two java threads) available in the tcl > environment > for Expect to listen on? It's a shame that this isn't currently possible. I have hacks for Jacl that allow me to wrap an arbitrary Java stream as a Tcl channel. But it requires changes to the API, like making tcl.lang.Channel a public class. For Expect you need TclBlend which relies on native I/O. I'd wager that modifying it to call back into a Java stream would be difficult, maybe impossible without modifying the core. -- Jeff Sturm [EMAIL PROTECTED] The TclJava mailing list is sponsored by Scriptics Corporation. To subscribe:send mail to [EMAIL PROTECTED] with the word SUBSCRIBE as the subject. To unsubscribe: send mail to [EMAIL PROTECTED] with the word UNSUBSCRIBE as the subject. To send to the list, send email to '[EMAIL PROTECTED]'. An archive is available at http://www.mail-archive.com/tcljava@scriptics.com
[Tcl Java] TclBlend and Expect - exporting a java stream into tcl
Hi, I've been using Tcl/Tk heavily for several yers, java to some extent, and I'm currently investigating Expect for testing purposes. Since we will be interfacing a bunch of simulators (separate Unix processes) and real targets (dedicated hardware) from the same test system as we also want to test bits and pices of java code, it sounds ideal to put Expect and TclBlend together (haven't tried it yet, though). But even at this stage I forsee a problem: How do I make a stream (used for internal communication between two java threads) available in the tcl environment for Expect to listen on? As far as I understand, I really need the actaul stream in order to use Expect. If I do a work-around using, e.g., event generation in java, I can implement an Expect like behaviour within tcl. But I don't want to re-implement Expect... I've tried to find similar questions in your archive, but they don't adress the actual exporting of a stream, thye propagate java stream output by other means. Yours, Peter Loborg The TclJava mailing list is sponsored by Scriptics Corporation. To subscribe:send mail to [EMAIL PROTECTED] with the word SUBSCRIBE as the subject. To unsubscribe: send mail to [EMAIL PROTECTED] with the word UNSUBSCRIBE as the subject. To send to the list, send email to '[EMAIL PROTECTED]'. An archive is available at http://www.mail-archive.com/tcljava@scriptics.com