Help embedding python

John Roth newsgroups at jhrothjr.com
Mon Aug 25 21:08:06 CEST 2003


"Zora Honey" <zhoney at wildmail.com> wrote in message
news:bidf9a$78v$1 at info4.fnal.gov...
> My husband and I are writing a program that does a lot of math behind
> the scenes (c++) with a gui front (python/Tkinter).  We've decided that
> we want the c++ to be the "driver", and so we want to embed the python.
>   We are not stupid people, and we've already searched this newsgroup
> and the web at large for help, but we're having a heck of a time trying
> to do this.
>
> We're using Python 2.2 and Mark Lutz' "Programming Python" as a guide.
> Unfortunately, the code in there is a little out of date (loading
> certain libraries), and we haven't been able to get any examples to work
> (we even tried downloading the version he uses in the book, but it fails
> on the build).
>
> So I'm wondering if someone out there has, or would be kind enough to
> create, a very simple ("hello world" type) program with Makefile that
> works under 2.2.
>
> I will be very grateful, as it is my job to do the graphics, so if I
> can't get python working, I'll have to learn another language...

I take it you've read the "Extending and Embedding the Python
Interpreter" manual that's part of the distribution? Section 5 is
about Embedding, and 5.5 is titled "Embedding the Python
Interpreter in C++".

HTH

John Roth

>
> Thanks,
> Zora
>






More information about the Python-list mailing list