On Tue, Nov 29, 2022 at 6:23 PM Mark Hammond <mhamm...@skippinet.com.au> wrote:

> The close method is ....

Microsoft is not helping much here. The documentation to which you
linked has no information about this method other than that it returns
a 32-bit integer for which no semantics are given, and that it lives
in the Microsoft.VisualStudio.Debugger.Interop namespace. I'm having a
little difficulty figuring out how that namespace would be appropriate
for their general scripting language interface.

> It's worth pointing out that any "obvious" bug in pywin32
> here would probably be able to be reproduced in, and
> reported by, the various other hosts, including cscript.exe
> and wscript.exe (which themselves are just active script
> hosts, just like your problematic host)

I had that thought, too. But then I realized that cscript.exe and
wscript.exe use a model of a separate process for each invocation of a
single script. That script can be very complicated, but it's loaded,
parsed, and executed once. I can run a pretty complicated Python macro
once per XMetaL session (by which I mean separate process) without any
problem. If I want to run a script twice using cscript.exe I have to
launch two separate cscript.exe processes.

It occurred to me that a better comparison might be using Internet
Explorer, which can presumably run multiple scripts multiple times in
a single process. So I grabbed form.htm from axscript/Demos/client/ie
(I promise I'm looking at the correct repository now 😊), thinking I'd
see if clicking the Submit button multiple times caused any problems.
Unfortunately, the scripts didn't fire at all, and the browser's
console window didn't provide any explanation as to why. (By the way,
I had to fix the third INPUT element, which was malformed, as its tag
was missing its right angle bracket delimiter. IE may have been
tolerant of that broken syntax at some time in the past, but it
doesn't accept it now.)

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

Reply via email to