0

I have a command line program developed in c. Lets say, i have a parser written in C. Now i am developing a project with gui in python and i need that parser for python project. In c we can invoke a system call and redirect the output to system.out or a file. Is there are any way to do this python? I have both code and executable file of c program. Thanks in advance.

shantanu
  • 2,388
  • 2
  • 25
  • 55
  • possible duplicate of [python - how to create a subprocess?](http://stackoverflow.com/questions/4488255/python-how-to-create-a-subprocess) – Martijn Pieters Jun 23 '12 at 14:58

2 Answers2

1

To call other programs and interact with them use the subprocess module.

Burhan Khalid
  • 161,711
  • 18
  • 231
  • 272
1

Sure you can, go for a subprocess. Docs are here: http://docs.python.org/library/subprocess.html#module-subprocess

luke14free
  • 2,491
  • 1
  • 16
  • 24