This is the mail archive of the guile@cygnus.com mailing list for the guile project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Colin, I'm forwarding your message to a couple of mailing lists for better responses than I could give you. -pate >>>>> "Colin" == Colin Fox <colinf@rogers.wave.ca> writes: Colin> I apologize beforehand if I've already bothered you with Colin> this. Colin> Embarassingly enough, I don't seem to have a copy of the Colin> letter I sent asking for help, so I don't remember if it Colin> was you that I asked. Colin> So here I am asking again... Colin> I'm writing a modeller and I want a Guile shell, in exactly Colin> the same manner that The Gimp has a SIOD shell. In fact, Colin> I've just completely ripped off their code & modified it to Colin> work with Guile instead of SIOD. Colin> I've got it almost completely done, with one last Colin> problem. I can't figure out how to capture the output of Colin> Guile and redirect it into my shell. Colin> This is what I'm doing (removing the error checks for Colin> clarity): Colin> pipe (guile_output_pipe); guile_output = fdopen Colin> (guile_output_pipe [1], "w")); outp = scm_stdio_to_port Colin> ( guile_output, "w", "standard output" ); Colin> scm_set_current_output_port( outp ); Colin> and then, I'm telling GTK to capture the results with: Colin> cint.input_id = gdk_input_add (guile_output_pipe[0], Colin> GDK_INPUT_READ, guile_read, NULL); Colin> (guile_read is a callback meant to be called when there is Colin> input on guile_output_pipe[0]). Colin> Anyway, the callback never gets called. I may be doing Colin> something stupid or obvious wrong, or there may be Colin> something else I need to do. Colin> The scm_set_current_output_port() is certainly doing Colin> *something*, since if I don't call it, I get the right Colin> results on my command line. If I do call it, the guile Colin> stuff no longer prints to the command line. Colin> Unfortunately, I can't find any documentation on this Colin> subject. Can you help, or point me at docs or examples? Colin> -- Colin Fox Radical Entertainment Inc. I speak only for Colin> myself. colinf@rogers.wave.ca www.loonie.net/~cfox/