Weizen
Weizen

Reputation: 263

import win32ui in python 3.6

I downloaded pywin32 from the website. I've got those imports:

from pywin32 import win32gui
from pywin32 import win32ui
from pywin32 import win32con

It doesn't work at all, but the first import works if i replace pywin32 with win32. Like this

from win32 import win32gui
from pywin32 import win32ui
from pywin32 import win32con

For the second one i've got this error

ModuleNotFoundError: No module named 'pywin32'

What should i do?

Upvotes: 1

Views: 13468

Answers (1)

wkl
wkl

Reputation: 79921

pywin32 doesn't expose a module named pywin32. Instead, it separates out into multiple modules that map to various parts of the Windows API.

So for you, the import statements should look like:

from win32 import win32gui
import win32ui
import win32con

Upvotes: 2

Related Questions