Consider the following scenario: I have a Python program which executes a C++ program by using the command call(["./record"])
. "record" is a C++ executable which contains the following lines:
int main(void) {
system("script --force --flush -q output.txt");
return 0;
}
This just turns on console recording. Then the Python script should print stuff which I would want to appear in output.txt. But as I see, after calling this C++ program the Python prints does not appear and the console is ready. Only once I type exit
my Python program continues. How can I handle this?
Aucun commentaire:
Enregistrer un commentaire