[python-win32] send function handler to COM/Jscript ?

Mark Hammond mhammond at skippinet.com.au
Wed Mar 7 23:12:22 CET 2007


> I drive Internet-Explorer, with win32com.client.Dispatch
>
> It's run very well.
> Among other things,  I can "attach" (with =) jscript function
> (content in
> HTML page) to a Python object, callable, and I use it, in
> Python's script
> (like a Python function).
...
> Somebody has a track of solution?

You need to pass a pythoncom object that handled DISPID_VALUE.
Theoretically, you should just be able to implement a 'normal' pythoncom
object, but include a method called '_value_' - this should be called by JS.
You may need to register your object for debugging so you can track exactly
what JS is doing to your object, and when.

Sorry this remains vague, but I hope it helps anyway.

Mark



More information about the Python-win32 mailing list