B
Brian Hlubocky
I'm have a fairly simple (in terms of COM) python program that pulls
info from an Access database and creates Outlook contacts from that
information. It uses wxPython for gui and works without problems.
I want to be able to distribute this program using py2exe, but I am
having some problems. I am using a simple setup.py like in the
documentation for the py2exe tool and everything compiles ok, except
that when I run the exe, I get an exception that says "ImportError: no
module named pythoncom." My program used win32com (which appears to be
loaded fine with the executable) until I needed thread support for the
gui. In order to do this, I needed to import pythoncom and call
CoInitialize() and CoUninitialize() manually for the new thread. I
believe it is this use of the pythoncom module that py2exe is having
trouble with.
I tried adding "pythoncom" to the import list in the distutils
setup.py but the py2exe tool gave me a warning that said it couldn't
be located. I am able to import this module just fine in python
scripts and at the interpreter. I am relatively new to COM and its use
with python as well as with distutils and py2exe. If anyone could help
me out with this, it would be greatly appreciated!
Thanks,
Brian
info from an Access database and creates Outlook contacts from that
information. It uses wxPython for gui and works without problems.
I want to be able to distribute this program using py2exe, but I am
having some problems. I am using a simple setup.py like in the
documentation for the py2exe tool and everything compiles ok, except
that when I run the exe, I get an exception that says "ImportError: no
module named pythoncom." My program used win32com (which appears to be
loaded fine with the executable) until I needed thread support for the
gui. In order to do this, I needed to import pythoncom and call
CoInitialize() and CoUninitialize() manually for the new thread. I
believe it is this use of the pythoncom module that py2exe is having
trouble with.
I tried adding "pythoncom" to the import list in the distutils
setup.py but the py2exe tool gave me a warning that said it couldn't
be located. I am able to import this module just fine in python
scripts and at the interpreter. I am relatively new to COM and its use
with python as well as with distutils and py2exe. If anyone could help
me out with this, it would be greatly appreciated!
Thanks,
Brian