Module initialization problem when using COM

Mark Hammond MHammond at skippinet.com.au
Fri May 21 20:08:47 EDT 1999


Robin Boerdijk wrote in message
<0E16861EE7BCD111BE9400805FE6841F0949A5B2 at c1s5x001.cor.srvfarm.origin-it.com
>...
>We have the following problem: The initialization function of the ILU
>extension module gets called more than once when used within a Python COM
>server and called from Visual Basic (and this makes ILU crash).
>
>To investigate the problem, we built the following small extension module,
>called "empty", that only has an initialization function that counts the
>number of times it gets called and logs this into a file:

<snip>

>Again, for ILU this causes the extension module to crash. Is this a VB,
>Python or COM problem ? Any ideas how to solve it ?

Well, I would have to say it is a PythonCOM problem somehow.  This is
clearly voilating how Python says imports will work.  But for the life of me
I cant see why this is happening without running the code.  Fortunately you
provided a nice set of test code - thanks!  Unfortunately, I dont have time
at the moment - but I will try and sort this before I release my next build.

Also for my info, I would like to confirm this behaviour on a machine with
only Python and the Win32 extensions installed, just to ensure that ILU or
something else isnt causing this.  If this same behaviour occurs for modules
such as win32api, pythoncom, pywintypes etc, then Im highly surprised it
hasnt been noticed before...

Thanks,

Mark.






More information about the Python-list mailing list