import win32ui in python 3.6

12.5k Views Asked by At

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?

1

There are 1 best solutions below

0
On

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