Robert Sudwarts wrote:
Hi,
I'm hoping that someone can help with this... I've seen some old posts which
I think may refer to this same issue but I'm having difficulty understanding
how to come up with a solution, and particularly where any
"PumpWaitingMessages" should be located and/or/how/whether
pythoncom.CoInitializeEx(pythoncom.COINIT_MULTITHREADED) should be used.
The code processes data for 25/30 messages received back from the com object
but then seems to jump back to the 'if __name__ == '__main__' and passes
that same parameter (originally passed from the command line) and runs all
over again...
Stab in the dark here:
Are you perhaps importing your original script as a module someplace?
If you have recursive imports, you can actually see two instances of the
same module, which can lead to the kind of behavior you're describing.
If your main script is called main.py, then search for any reference
to main in another source file, in a line such as
import main
or
from main import fh
or some such.
DaveA
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32