Ask coding questions

← Back to all posts
How do you call a .py file from C++?
Typhlotion (1)

Title says it all. I've got an only fundamental understanding of c++ and zero knowledge on python, but I need to call a .py file for something involving a school project. Can anyone give me an explanation simple enough for a beginner like me?

Answered by Kai_Justice (278) [earned 5 cycles]
View Answer
Comments
hotnewtop
Kai_Justice (278)

system("python3 ./name_of_python_file.py");

Typhlotion (1)

@Kai_Justice thanks, i've been looking of a simple and concise answer for a long while.