Hey there. I've been programming in Python for about a month now. I've created simple programs for myself, such as games and e-mail applications. Still getting GUI down, I'll post if I need help there. Anyways, here's my problem:
Running: Windows XP
Python: Python 2.6

I installed the newest version of the Python for Windows Applications for v2.6 of Python. That went fine. It includes the module pythoncom, which I require. However, when I try to import pythoncom, I get the following:

Traceback (most recent call last):
  File "<pyshell#20>", line 1, in <module>
    import pythoncom
  File "C:\Python26\lib\site-packages\pythoncom.py", line 2, in <module>
    import pywintypes
ImportError: No module named pywintypes

How do I fix this problem? I already searched Google for an answer, and got pretty much nothing. It took me forever to even find pythoncom to download.
~ Hondros

Recommended Answers

All 4 Replies

did you install the win32all package?

Um, I'm not quite sure what you mean. I installed the package from Source Forge, and I have a whole bunch of new modules, so I guess so.

Fixed it. Had to copy pywintypes.py, .pyc, and .pyo from:
I then ran IDLE and typed:
import pythoncom
and it works fine :D


I followed the same steps mentioned above, but still getting the same error:
ImportError: No module named pythoncom

Please suggest me how to resolve this error.


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.