Linking C++ API with CherryPy

26 views
Skip to first unread message

Venkatesh

unread,
Sep 17, 2008, 7:54:29 AM9/17/08
to cherrypy-devel
Dear All,
I have a requirement in my project, where I need to some home-grown C+
+ source code from CherryPy framework. I would like to know whether
the cherrypy framework does support for C++ code integration. If it
does supports for C++ code integration, I would like to know how it
could be done. Could anyone please throw somelight on this problem?

Your valuable technical input is highly appreciated.


Thanks in advance,
Regards,
Venkatesh

Sylvain Hellegouarch

unread,
Sep 17, 2008, 8:08:14 AM9/17/08
to cherryp...@googlegroups.com
Hi,

> I have a requirement in my project, where I need to some home-grown C+
> + source code from CherryPy framework. I would like to know whether
> the cherrypy framework does support for C++ code integration. If it
> does supports for C++ code integration, I would like to know how it
> could be done. Could anyone please throw somelight on this problem?

CherryPy doesn't actually care about it. Just create a Python binding to
your C++ code (using sip, SWIG, boost, etc.) and import that binding
inside CherryPy.

The only aspect you have to be careful of is thread safety. CherryPy
heavily uses threads so depending on what your library does it may be a
problem or not.

- Sylvain


--
Sylvain Hellegouarch
http://www.defuze.org

Lakin Wecker

unread,
Sep 17, 2008, 5:10:19 PM9/17/08
to cherryp...@googlegroups.com
Silvain is right.  You need to make a Python binding for your C++ module.

I've had good experiences using py++ to do this.
http://www.language-binding.net/pyplusplus/pyplusplus.html

Lakin
Reply all
Reply to author
Forward
0 new messages