win32com.client import problem : solved

Threader Slash threaderslash at gmail.com
Wed Oct 14 14:10:55 EDT 2009


---------- Forwarded message ----------
From: Dave Angel <davea at ieee.org>
To: Threader Slash <threaderslash at gmail.com>
Date: Wed, 14 Oct 2009 07:04:21 -0400
Subject: Re: win32com.client import problem
Threader Slash wrote:

> Hi Everybody,
>
> I have 2 imports:
>
> import pythoncom
> from win32com.client import Dispatch
>
> if I run it on my Python 2.6 Console, it works nicely. However, when I go
> to
> Eclipse IDE, open a project, open a main.py file, and try run, it gives the
> error:
>
> import pythoncom
> ImportError: No module named pythoncom
>
> All other imports are working ok on Eclipse IDE -- e.g. import MySQLdb.
>
> Any suggestion about what is missing?
>
> All comments and suggestion are welcome.
>
> ThreaderSlash
>
>
>
Two things to check, python version (sys.version), and sys.path.   Add
prints for the two of them at the beginning of your script, and try the
script in both environments.  If there are any differences, figure out how
to reconfigure Eclipse to match what you've got at the console.


DaveA


----------  ----------  ----------  ----------

-- hope this can help and save time for others too

Here is what did and works:
* copy the file mfc71.dll on windows\system32
* copy the same also on directories
* copy the same to your directories Python26\DLLs and
Python26\lib\site-packages\win32
* go to preferences : pydev : interpreter python : remove all the
interpreter you have there. apply, ok.
then add python 2.6 again, apply, ok.

It will do the trick.......|:0), ThreaderSlash

----------  ----------  ----------  ----------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20091015/639fcd50/attachment.html>


More information about the Python-list mailing list