On 5/05/2010 5:33 AM, Marc-Andre Belzile wrote:
Hi,
I'm trying to execute some python code when a new ActiveX Python engine
is instantiated. I thought I could use sitecustomize.py to put my code
in but this module seems to get executed only for the first engine
created (probably when pythoncomXX.dll is loaded for the first time).
Is there a different python module I can rely on when a new engine is
created ? Or maybe there is another way to call a python script when a
new engine is created ?
Your best bet is probably to create your own subclass of the axscript
implementation (with different CLSID) and override (eg) InitNew to take
some action as the engine is initialized.
Cheers,
Mark
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32