Calling C/C++ not contained inside a .dll

Mike Meyer mwm at mired.org
Mon May 16 03:41:25 EDT 2005


delrocco at gmail.com writes:

> My question is..
> How do I get python scripts to call functions in my game code without
> having to build a .dll that has the entire meat of my game inside of
> it?  Ultimately I want to be able to load scripts from my game and
> have those scripts call functions in my game code.

This is a pretty generic question for any application: how do I invoke
my applications functionality from a python script.

You want to embed python in your game, and then extend the embedded
python interpter. This is covered in the chapter with pretty much that
as the title: <url:
http://docs.python.org/ext/extending-with-embedding.html >.

         <mike
-- 
Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.



More information about the Python-list mailing list