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,408
  • 2
  • 26
  • 56
  • 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
  • 169,990
  • 18
  • 245
  • 284
1

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

luke14free
  • 2,529
  • 1
  • 17
  • 25