I'm passing data between programs written in C++ and python.
I've found one of the simplest ways to do this is to compile a C++ program, then just call it in python using subprocess.call('cprog.exe arg1 arg2', shell=True)
, and to transfer the data via the arguments arg1, arg2.... etc
This avoids using Cython, boost... etc.... which I have found are a huge pain to get working on windows. Especially on an aging server not connected to the internet. (please don't reply to this post trying to help with cython or boost etc. - I want to restrict discussion to the main question.)
My question is: What are the limits of this approach?
Can I serialise/encode/decode entire arrays of data and pass them via the command line arguments in this fashion? What about files several gigabytes in size?
Would this be a faster approach than writing to, then reading from, the hard drive?
EDIT: It seems this is relevant: Maximum Length of Command Line String