Это python код
import subprocess
cmd = "HelloWorld.c"
# Example
# cmd = HelloWorld.c
print("Hey this is Python Script Running\n")
subprocess.call(["gcc", cmd]) # For Compiling
subprocess.call("./a.out", shell = True)
# end thats all
Это C код
#include<stdio.h>
int main()
{
printf("Hello World\n");
printf("This C program Running\n");
return 0;
}
Это код ошибки.
Эй, это Python Запуск сценария
Traceback (most recent call last):
File "C:/Users/Yogi/PycharmProjects/Last_Subprocess_Try/Subprocess/Test.py", line 7, in <module>
subprocess.call(["gcc", cmd]) # For Compiling
FileNotFoundError: [WinError 2] The system cannot find the file specified
Process finished with exit code 1