tags:

views:

804

answers:

3

Hi,

I'm writing a GUI application that will let users interact with command-line programs. The programs are crystallography programs, in this case. They take a long time to run.

There's a certain common workflow using the command-line programs. The output from one program is typically processed and then is used by other programs. The user needs to be able to fill in various text boxes and select options that are sent to the command-line programs.

As I'm lazy and don't want to do more work than I need to, what tools are out there that will help me in doing this? The software needs to work initially on Linux, but also running on Windows at some point would be neat.

Would also be neat if there was some sort of DSL for non-programmers to be able to extend/modify the GUI application (to add new programs and change the options and so on).

A: 

You can use WShell and redirect stdin stdout.

object console = WShell.Exec(cmdLine);
if (console.StdOut.AtEndOfStream)
    s = Pipe.StdOut.ReadLine();

Downside that you still have to figure out how to hode console window. But it is easy one. You need to find this window by window title and set its properties to ivisible. Or use freeware some utility from internet which can do it automatically for you.

Din
A: 

TCL/TK was the traditional way.
Today I would use python with either wxPython (more complete) or FLTK(simpler).

If you don't need to readback results from the commandline program it's much easier -
eg os.system("command options")

Martin Beckett
+1  A: 

Take a look at GTK Server it is easily scriptable from any language and since it runs as a service (bit like a browser) it can be used across systems. That is, the system running the command line stuff can be on a powerful system and the GTK Server running on the user's desktop PC. The examples are easy to follow and the matrix of versions and languages is bound to include yours. If you are unlucky, just pick the closest combination for examples.

CyberED