Extending back to the embedder

Gerhard Häring gerhard at bigfoot.de
Fri Oct 19 21:17:10 CEST 2001

On Fri, Oct 19, 2001 at 12:07:03PM -0700, David Brady wrote:
> Hello all,
> I am trying to use Python as a macro language for my
> application (written in MFC/C++).  What I would like
> to do is allow users to write short scripts in Python
> that can control the parent application.

Short answer: look into Demo/embed/demo.c in the Python source tree for
an example of doing this.

It exposes a xyzzy module to the Python interpreter it embeds.

mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://www.cs.fhm.edu/~ifw00065/    OpenPGP public key id 86AB43C0
public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))

More information about the Python-list mailing list