[python-win32] error importing win32com for Dispatch
Amelie Lesser
amelie.lesser at googlemail.com
Mon Jan 31 15:41:59 CET 2011
Hello Group,
I am struggling very hard with using the win32com.client to use Dispatch.
I've been looking around quite a lot, but couldn't find any help that solved
my problem. I only started working with python 2 months ago, so I am still
quite the newbie.
I'm working on a python script that is supposed to read a database into a
list. It then should take certain information from each data entry, plug
them into an excel file, let excel do a rather complex calculation using
macros, and append the results from certain cells back to the list.
I am working on Windows using the python IDLE shell and also tried it in
gedit running the file on the cmd line.
I downloaded the pywin32 extension from
http://sourceforge.net/projects/pywin32/ and ran the setup.py file.
The program starts with:
*from win32com.client import Dispatch
*
For which I receive the following Error message:
*Traceback (most recent call last):
File "Z:\testpython\dbf_converter\testing.py", line 3, in <module>
from win32com.client import Dispatch
ImportError: No module named win32com.client*
- I read through the Installation Problems on
http://starship.python.net/~skippy/win32/InstallationProblems.html. I
found that I do have two versions of the python27.dll file, and deleted the
one in the C:\Python27 directory, but everytime I start IDLE it re-creates
that file.
- I also tried setting the path using (separately) ...but no difference.
- *sys.path.append('C:\\WINDOWS\\system32\\')*
- *sys.path.append('C:\\Python27\\pywin32-214\\pywin32-214\\com')*
- I tried deleting and reinstalling the extension
I am completely lost and would really appreciate any help.
Amelie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20110131/b21b4fde/attachment.html>
More information about the python-win32
mailing list