1

We have a CLI application with business logic inside, written in python. We want to build native GUI apps in both windows and mac, providing the funcionality of the CLI.

What is the best (easy, fast to implement) way to communicate (two-way) between the GUI app and the CLI communication, in a way that the extra code developed in the CLI will work with both windows and mac native apps? CLI and GUI apps will be on the same machine. Calls will be made to the CLI like uploading a file, and feedback will be returned to GUI, like progress, errors, etc.

Any solution is considered: Sockets, Remote procedure calls, any other interprocess communication way, any other obvious(?) but missed solution.

Thank you!

Cilyan
  • 7,883
  • 1
  • 29
  • 37
V-Lamp
  • 1,630
  • 10
  • 18
  • 1
    Is there a reason you don't want to just build your GUI apps in Python? Then you don't need to worry about interprocess communication, as you could just import the relevant libraries directly in to the GUI app code. Otherwise, you should be able to open a subprocess from pretty much any language you choose then operate over stdin/stdout to the child process. – Silas Ray Nov 18 '13 at 17:00
  • 1
    You might want to have a look at http://stackoverflow.com/questions/6915191/simple-ipc-between-c-and-python-cross-platform. – jazzpi Nov 18 '13 at 17:03
  • The right way to interact with a Command Line Interface is to call the program with specific arguments, feed it input data on stdin and get data back on stdout. I believe you're after a Client/Server architecture. – Cilyan Nov 18 '13 at 17:11

1 Answers1

1

Not a final answer, but there is a cross-platform IPC library with .NET and Python bindings, that is used by iPython called ZeroMQ. You may want to check that. http://zeromq.org/

Cilyan
  • 7,883
  • 1
  • 29
  • 37