[python-win32] COM Server won't go away!
Noah Spurrier
noah@sfbags.com
Wed, 27 Feb 2002 17:48:06 -0800
Ah, yes, this is evident because the problem goes away if
I shut down VB and restart it again. Kind of a crappy, but at
least it's easy to do and it makes sense.
I thought that setting my Python COM object reference to "Nothing"
(VB Equivalent of None) that it would unload the object, but no such luck...
Yours,
Noah
> -----Original Message-----
> From: python-win32-admin@python.org
> [mailto:python-win32-admin@python.org]On Behalf Of Mark Hammond
> Sent: Wednesday, February 27, 2002 4:41 PM
> To: noah@sfbags.com
> Cc: python-win32@python.org
> Subject: RE: [python-win32] COM Server won't go away!
>
>
> Python itself has been loaded into the VB designer process. When you start
> your test program, it is still running inside the VB environment.
>
> If you were really keen, you could have your program use the
> Python.Interpreter COM object, and attempt to import then reload your module
> by name. The reload should then force any subsequent creations of your
> object to use the new module.
>
> Mark.
>
> > -----Original Message-----
> > From: python-win32-admin@python.org
> > [mailto:python-win32-admin@python.org]On Behalf Of Noah Spurrier
> > Sent: Thursday, 28 February 2002 8:21 AM
> > To: python-win32@python.org
> > Subject: [python-win32] COM Server won't go away!
> >
> >
> >
> > I created a server and registered it OK. I called it from a
> > VisualBasic client. OK. It worked.
> > Then I unregistered it. Tested VB client again and it failed to
> > find the server. OK. That was expected.
> >
> > Next I modified the source of the Python server and saved it and
> > registered it.
> > When I tested it from VB again it was running the OLD version.
> >
> > I thought maybe it was running from an old .pyc file, but I could
> > not find any .pyc files around.
> > So then I changed the GUID (_reg_clsid_). I test again and it
> > still runs the old copy.
> > So then I changed the GUID and I changed ProgramID and I have the
> > VB client create the object with the new name.
> > It STILL runs the old copy!
> >
> > Finally, I rename the Python source filename for the server source.
> > This time the VB Client FINALLY runs the new version.
> >
> > So the question is, where was VB finding this crusty old copy of
> > the server?
> > Was it cached in memory somehow? And why would it be tied to the
> > Python source file name?
> >
> > Is this a common problem? I couldn't find any references to this
> > in a FAQ in the mailing list archives.
> >
> > Yours,
> > Noah
> >
> >
> > _______________________________________________
> > Python-win32 mailing list
> > Python-win32@python.org
> > http://mail.python.org/mailman/listinfo/python-win32
> >
>
>
> _______________________________________________
> Python-win32 mailing list
> Python-win32@python.org
> http://mail.python.org/mailman/listinfo/python-win32
>