Jan-12-2017, 10:56 AM
hi guys
how i can run C++ code in python ?
how i can run C++ code in python ?

How to run C++ code
|
Jan-12-2017, 10:56 AM
hi guys
how i can run C++ code in python ? ![]()
Jan-12-2017, 10:58 AM
Hello,
a quick search gave me these results of people with same question: http://stackoverflow.com/questions/14527...rom-python http://stackoverflow.com/questions/13498...hon-script and docs page: https://docs.python.org/3.5/extending/extending.html Does any of those links contain the information you are looking for?
Jan-12-2017, 11:10 AM
yes...
I did not understand. I'm a simple example.
Jan-12-2017, 11:29 AM
You can't. You have to compile it in order to run it. You can use C objects, data, instances though.
Jan-12-2017, 12:32 PM
(Jan-12-2017, 11:29 AM)wavic Wrote: You can't. You have to compile it in order to run it. You can use C objects, data, instances though. I can not use C++ functions in python ? if yes, how i can call C++ Functions in python. ![]() 2- i can not run this code (below code) in python ?? : if yes, how i can? (for int i = 0; i < 10 ; i++) { cout<< i; } sorry, i understand a little english ![]() i see in internet and book , i can run c++ code in python, but i dont understand how i can run!
Jan-12-2017, 12:51 PM
(Jan-12-2017, 12:32 PM)sajley Wrote: 2- i can not run this code (below code) in python ?? : if yes, how i can? If this is all you are running or similar, just change your print line for C and make an extension.
Recommended Tutorials:
Jan-12-2017, 01:34 PM
Jan-13-2017, 09:07 AM
This is similar in python:
for i in range(10): print(i)
Jan-14-2017, 12:24 PM
I've found this. I think it do what you want
|
|