I am using windows OS.
For example, a GUI application is written in nim, in which I choose a lot of excel files to be processed, input the column name in excel files to be read, choose a destination output file name; then these parameters are passed to another application in Python.
The Python application will feed back some information to be shown on the nim application's GUI.
I can only imagine a way to write the parameters into a text, json or something else file, the the other application reads it.
But is there any other ways with pre-built package? Thanks
There are several ways,
if the python app is fired only once, then maybe command line params and stdout are enough for communication.
or both applications communicate with network sockets:
Socket one
nim -socket-> python
- python do this
- python do that
socket2:
nim <-socket- python
- nim this was done
- nim update the gui please
you could send line seperated json objects through the network socket, this would just require readLine() and parseJson() on both sides.
I've choosen two sockets for this proposal, because then socket1 can always send, and socket2 can always receive (or the other way around).
Please also remember that it does not make a difference who is initiating a tcp conneciton. So who is the "server" does not matter. It could be nim or python who is listening.
If you have more concrete questions, don't hesitate to ask.
sure you can but then its not so simple to have an "eval loop"
socket1:
--connection->
--do this->
<--ok-some info---
--do that->
<--ok-some info---
socket2:
-connection->
<-update this--
----ok---->
<-update that--
----ok---->
multiplexing different channels over one line is more complex and when he asks for "how to do interprocess communication" then i guess he wants it simple.