🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Embending python... how to make it easily

Started by
3 comments, last by HexDump 20 years, 9 months ago
Hello, I would like to know if there''s any util like swig for embending Python into C++. I´m new to python and it is a bit confusing all the things you have to do to call python objects, mantain reference count, etc..., any help pls? Thanks in advance, HexDump.
Advertisement
You can use SWIG or BOOST. Python's API is notoriously difficult.

[teamonkey]

[edited by - teamonkey on September 17, 2003 2:52:40 PM]
[teamonkey] [blog] [tinyminions]
But I have read several times swig doc and I only see that swig can produce glue code when extending not embedding :/. Sure I´m wrong, but I need someone to light my way here .

HexDump.
Search through this forum for ''embed Python''. It''s been covered many, many times (including posts from me). Personally, I use Boost.Python, and I find it quite adequate, and reasonably fast.

Chris Pergrossi
My Realm | "Good Morning, Dave"
Chris PergrossiMy Realm | "Good Morning, Dave"
Also check the Forum FAQ for some alternatives to SWIG and Boost. Extending and embedding are very similar; all you''re doing is reversing the way in which the parameters are being passed, really.

[ MSVC Fixes | STL Docs | SDL | Game AI | Sockets | C++ Faq Lite | Boost
Asking Questions | Organising code files | My stuff | Tiny XML | STLPort]

This topic is closed to new replies.

Advertisement