Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IPC between Python and C#

I want to pass data between a Python and a C# application in Windows (I want the channel to be bi-directional) In fact I wanna pass a struct containing data about a network packet that I've captured with C# (SharpPcap) to the Python app and then send back a modified packet to the C# program. What do you propose ? (I rather it be a fast method) My searches so far revealed that I can use these technologies, but I don't know which:

  1. JSON-RPC
  2. Use WCF (run the project under IronPython using Ironclad)
  3. WCF (use Python for .NET)
like image 218
Mehdi Asgari Avatar asked Nov 09 '09 10:11

Mehdi Asgari


2 Answers

Why not use a simple socket communication, or if you wish you can start a simple http server, and/or do json-rpc over it.

like image 103
Anurag Uniyal Avatar answered Oct 01 '22 09:10

Anurag Uniyal


Use JSON-RPC because the experience that you gain will have more practical use. JSON is widely used in web applications written in all of the dozen or so most popular languages.

like image 26
Michael Dillon Avatar answered Oct 01 '22 11:10

Michael Dillon