Call a foreign-language function: Difference between revisions
Content added Content deleted
m (→{{header|Ol}}) |
m (→Python) |
||
Line 281: | Line 281: | ||
===Python=== |
===Python=== |
||
'''IMPORTANT''' : The following implementation has been tested against Python 2.7, this won't work on a system which does not have the relevant files installed. Also pay attention to the compilation flags. |
'''IMPORTANT''' : The following implementation has been tested against Python 2.7, this won't work on a system which does not have the relevant files installed. Also pay attention to the compilation flags. |
||
<lang C> |
<lang C>#include <python2.7/Python.h> |
||
#include<python2.7/Python.h> |
|||
int main() |
int main() |
||
Line 297: | Line 296: | ||
Py_Finalize(); |
Py_Finalize(); |
||
return 0; |
return 0; |
||
⚫ | |||
} |
|||
⚫ | |||
'''Compilation''' : Change 2.7 and relevant paths for a different Python version / different install location |
'''Compilation''' : Change 2.7 and relevant paths for a different Python version / different install location |
||
<pre> |
<pre> |