How can i call C++ class in Python

How can i use c++ class in python , i am currently writing a project in school and i have already do same thing in c++ so i want to re-used my class in C++ in python which is the lauguage required for: i have heard about python.h file which can be include in C++ or C but i try it


[/
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

#include <Python.h>


int Sum(int a,int b)
         {
                  return a+b;
    

#include <Python.h>


int Sum(int a,int b)
         {
                  return a+b;
                 }







Out is:

\Users\Cathy\Desktop\CC++Python\Py.cpp C:\Users\Cathy\Desktop\CC++Python\C Python.h: No such file or directory. 



Thanks for your help in advance
Last edited on
What you want to do is extend Python.
http://docs.python.org/2/extending/
Topic archived. No new replies allowed.