How to import win32api and win32con - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: How to import win32api and win32con (/thread-16213.html) |
How to import win32api and win32con - SheeppOSU - Feb-18-2019 So I'm trying to import win32api and win32con. So I was researching and I found that I needed pywin32 to do this. So I used pip and installed it but python still said pywin32 was an invalid module. So I'm kinda stuck. Can someone help me? I tried this. from PyWin32 import win32api, win32conI also tried this from pywin32 import win32api, win32con RE: How to import win32api and win32con - Larz60+ - Feb-18-2019 see: https://superuser.com/a/1329256 RE: How to import win32api and win32con - snippsat - Feb-19-2019 Use pypiwin32 it's a newer version to get out of exe install of PyWin32 install and over to pip .It also simply some imports. (my_env) E:\div_code\my_env λ pip install pypiwin32 Collecting pypiwin32 ''''' Using cached cp37m-win32.whl (8.3MB) 100% |████████████████████████████████| 8.3MB 1.9MB/s Installing collected packages: pywin32, pypiwin32 Successfully installed pypiwin32-223 pywin32-224 Use: (my_env) E:\div_code\my_env λ ptpython >>> import win32api, win32con # No erros >>> win32api.DeleteFile <built-in function DeleteFile> |