Jump to content
  • Advertisement
Sign in to follow this  
sipickles

Where does python fit in?

This topic is 4885 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

Yes. You can use PyRun_String() and related functions from the Python C API to run Python scripts from strings. You can also save function references as boost::python::objects and call them directly from C++.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by smr
For my project I considered this option, but it wouldn't have made much of a difference in speed. My major bottleneck was not code, but rather the slowness of python's class implementation, which keeps all variables as entries in a dictionary.


Using python's new-style classes with __slots__ can help with that slowness if it's a problem.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!