how to use c program in Python


hi to all
i want to use c program in python
or in other way i want to run c program from python


Run an external program from within Python code with["program-name", "arg1", "arg2"])
rather than os.system("program-name arg1 arg2")
since os.system() does not allow the Python program
to run in the background, whereas subprocess does.

Example ...

# play a midi file with a small external midiplayer: # from
# mplayer2.exe works too, but not wmplayer.exe
import subprocess["C:/Midi_stuff/AKoffPlr.exe", "DaarG.mid"])
Question Answered as of 1 Year Ago by vegaseat
This question has already been solved: Start a new discussion instead
Start New Discussion
Tags Related to this Article