[Python-au] thoughts on Python as an embedded language?

Grant McDonald gmcdonald at infocomp.com
Thu Sep 30 06:20:18 CEST 2004


If you are serious about embedding python a far better solution would be
either of the following programs:

For C programs use Pyrex:

http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/

download the program and look at the embedding samples.

For C++ programs use Boost.Python (especially if you are using classes):

http://www.boost.org/libs/python/doc/index.html

Here is a tutorial on embedding using Boost.Python

http://www.boost.org/libs/python/doc/tutorial/doc/embedding.html


-----Original Message-----
From: Roffe [mailto:pythonz at gmail.com] 
Sent: Wednesday, 29 September 2004 8:48 PM
To: python-au at python.net
Subject: Re: [Python-au] thoughts on Python as an embedded language?

Hi John,

On Tue, 28 Sep 2004 21:20:12 +0930, John Steele Scott
<toojays at toojays.net> wrote:

<snip>

> Are there any tricks or pitfalls which are not apparent from the Python
docs?
> I have made modules to bridge Python and C++ before, but have not yet
> actually embedded the Python interpreter within a C++ app.

I've been on this list for a month or two and I think this is the
first message I've received from it. I'm new to Python and get most of
my info from the Python general list at
http://mail.python.org/mailman/listinfo/python-list. So if you have no
luck here, check there?

I just did a quick search on it and found the following in response to
a similar question:

"From Rick Ratzel 	

Have you checked out elmer?

http://elmer.sourceforge.net

It generates the code needed to embed a Python module into a C
application."

Not sure if it's right for you, but perhaps a start.

Cheers,

Will

> cheers,
> 
> John

_______________________________________________
python-au maillist  -  python-au at starship.python.net
http://starship.python.net/mailman/listinfo/python-au
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://starship.python.net/pipermail/python-au/attachments/20040930/671f3961/attachment.html


More information about the python-au mailing list