HI Mark,

Thank you very much for the helpful information.

I was trying to connect Event-handlers implemented inside Python Active Script to EventSink at the Host App side.

But I cannot figure out how

I'll take a look at the files you advised.

Thank you again.

Wu




------ Original Message ------
From "Mark Hammond" <mhamm...@skippinet.com.au>
To "Wuping Xin" <oudou...@gmail.com>; python-win32@python.org
Date 3/12/2023 10:54:23 PM
Subject Re: [python-win32] How to enable events for Python Active Scripting?

It's difficult to know what exactly you mean, but if it is how to use 
IConnectionPoint etc from Python in general, then you should check out the 
following files in the distribution:

com\win32com\demos\connect.py
com\win32com\server\connect.py
com\win32com\client\connect.py

If it is about the use of these interfaces specifically with ActiveScripting, 
then you should find win32comext\axscript\test\testHost.py useful. 
win32comext\axscript\client\framework.py is where the implementation of Active 
Scripting's event handling is implemented - eg, see the functions Connect, 
CreateConnections, ConnectEventHandlers etc in that file.

HTH,

Mark

On 13/03/2023 1:05 am, Wuping Xin wrote:
I have a host application that uses Python Active Scripting.   That host 
application implements IConnectionPoint / IConnectionPointContainers etc, and I 
am able to set COM event callbacks in C++.

But I am having a hard time to figure out how to set COM event callback with Python 
Active Scripting - I bought the book "/Python Programming On Win32, but /it 
doesn't provide much information about//Python Active Scripting COM events.

Need help and much appreciate any advice.

Wu

_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to