in reply to Re^3: embedding xterm in perl/tk window
in thread embedding xterm in perl/tk window

Actually I have a ROText for outputing formated (nicely colored, parsed etc) data from some programs that my perl/tk application calls.

Some programs ask for feedback from the user in a complicated way that I do not dare to use open3 to handle it. So, I thought that I could embed a terminal (xterm/konsole) as an "advanced" mode.

For now I just call xterm or konsole as an external window, but I would prefer a pretier solution.

  • Comment on Re^4: embedding xterm in perl/tk window

Replies are listed 'Best First'.
Re^5: embedding xterm in perl/tk window
by graff (Chancellor) on Oct 08, 2007 at 05:25 UTC
    Some programs ask for feedback from the user in a complicated way

    Can you edit these programs? If you can, change them so that they accept all necessary user input as command line args, rather than asking for input from the user after they start.

    If you can't edit them, have you checked to make sure whether they support a "non-interactive" mode of operation?

    If they absolutely require manual user input after they start, is it the case that the user is able to know what inputs will be needed before running the program? (Or is it instead the case that the program has to show some output, and then ask for manual input that might vary depending on what was shown and what the user wants to do?)

    If the choice is between a "free-floating" xterm (launched by your perl/tk app) vs. one that is embedded in your Tk window, and the former is working while the latter is proving to be a difficult challenge, it sounds like something that isn't really broken, and so maybe shouldn't be fixed.

      Unfortunately I can't edit the programs (I cannot distribute the edited ones etc) plus they are not very user-friendly. They have interactive and non-interactive responses depending on what function they perform, how they are invoked (with what parameters, data etc).

      I am trying to make a user friendly interface, thats why I thought of embedding the terminal, to have a more integrated look.

      Anyway I'm going to let xterm float. Thanks for the help.

        You might look at Expect instead. If the goal is to make things easier for the user, even in the face of stubbornly hard-to-use tools, running those tools via Expect will let you mediate the dialog in ways that can really make things easier for the user.