Jump to content
  • Advertisement
Sign in to follow this  
S-Rave

Python in C++

This topic is 3931 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In my current project I was thinking of rendering some "cool effect" in the background of my interface while the app is running, and then I reached the conclusion that I should make some kind of scripting language to make that possible. First I was thinking of making my own, with very limited functions, but it seemed better to use some existing scripting language, and since I've used python before it seemed best to use that. So I was wondering on how I can use python to render opengl when using c++ for everything else? Can I use boost.python for this? Cause from what little I read about it, it was more "use c++ functions from python" than the other way around (which I think is what I want). I dunno... anyhow, any ideas? :)

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by S-Rave
Can I use boost.python for this? Cause from what little I read about it, it was more "use c++ functions from python" than the other way around (which I think is what I want).



Calling c++ from python is called 'extending' python, while calling python from c++ (which is much nicer I thinK!) is called 'embedding'.

There is a small chpater on it in the boost.python tutorial, but a google search on EMBEDDING PYTHON C++ would help more.

Also consider signing up to the c++-sig mailing list where lots of nice patient people have helped me in the path. It specifically concerns interfacing python and c++

hth


EDIT

sicrane has done a handy article too

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!