FAQ
Just include the 'pythoncom23.dll'. (usally can be found in
%windir%/system32 -> Windows 2000).

Best Regards,
Kent Hsu

Brian Hlubocky <hlubocky at uiuc.edu> wrote in message
news:982e9537.0401071249.4d75c8fb at posting.google.com...
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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
grouppython-list @
categoriespython
postedJan 9, '04 at 11:24a
activeJan 9, '04 at 11:24a
posts1
users1
websitepython.org

1 user in discussion

Kent Hsu (Hsu, Chih-Peng): 1 post

People

Translate

site design / logo © 2019 Grokbase