Jan-12-2017, 10:56 AM
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?
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.
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?
(for int i = 0; i < 10 ; i++) {
cout<< i;
}
If this is all you are running or similar, just change your print line for C and make an extension.
Jan-12-2017, 01:34 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?Make it a function and use it. I don't know how you can call a C functions in Python because I never did it before.
Jan-13-2017, 09:07 AM
This is similar in python:
for i in range(10): print(i)