Python+PIL in ActiveX control

Eric van Riet Paap eric at
Fri Nov 16 12:43:41 CET 2001

Hi all,

I was trying to embed the Python interpreter in a windows ActiveX control.
The control I was working on can read and display tga files.
To make it more powerful I wanted to embed the Python Image Library (and
in the control.

However: I ran into very odd problem!

I've made an activex method the would execute some python code, in the line
The problem is that Py_Initialize(); seem to working, but when the next line
is executed the control
rapidely consumes all available memory and starts swapping to disk.

The control can be found in:
You must first register the control with the register.bat script.
After that the two test examples (source included) can be run, they have
identical functionality,
but one is written with Macromedia Director 8.5 (Shockwave) and the other
with VisualBasic6.0.

When you press the Python button in these programs while the task manager is
open you see what I mean!

You can kill the program when yoedon't wait too long, but be careful that
you don't have important programs open!!!


    Eric van Riet Paap,
    Oudegracht a/d Werf 309
    3511 PC  Utrecht, The Netherlands

More information about the Python-list mailing list