0

I have a list in python :

data = ['0x11', '0x22', '0x33' ...... ]

Call the executable main.out with data as argument to the binary :

os.system('./main.out')

I want to pass this list as an argument to an executable in c

int main(int argc, char* argv[]) {
  // need data from python here
}

What is the best possible way of doing this ? [apart from using ctypes]

I am looking for alternative options to do this

Dexter
  • 1,299
  • 3
  • 20
  • 38
  • 1
    http://stackoverflow.com/questions/14892355/passing-arguments-into-os-system – user23127 Jul 02 '14 at 06:36
  • There is no need to use ctypes at all. It is designed for calling functions from DLLs, not for running [`subprocess`](https://docs.python.org/2/library/subprocess.html)es. – glglgl Jul 02 '14 at 08:42

0 Answers0