Kalmat / PyWinCtl

Cross-Platform module to get info on and control windows on screen
Other
179 stars 19 forks source link

Issue with the typing package #69

Closed eliascarella closed 1 year ago

eliascarella commented 1 year ago

Hi,

I've created a very simple script to test out the library.

import pywinctl as pwc
print(pwc.getWindowsWithTitle())

Here's` the output

Traceback (most recent call last):
  File "importToRekordbox.py", line 5, in <module>
    import pywinctl as pwc
  File "/Users/eliascarella/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pywinctl/__init__.py", line 791, in <module>
    from ._pywinctl_macos import (MacOSNSWindow as NSWindow, MacOSWindow as Window, checkPermissions, getActiveWindow,
  File "/Users/eliascarella/.pyenv/versions/3.7.3/lib/python3.7/site-packages/pywinctl/_pywinctl_macos.py", line 26, in <module>
    from typing import TypedDict
ImportError: cannot import name 'TypedDict' from 'typing' (/Users/eliascarella/.pyenv/versions/3.7.3/lib/python3.7/typing.py)

I'm running python 3.7 Reinstalling both pwc and manually installing the typing package didn't solve the issue sadly. This happens with other pwc functions as well.

Thanks in advance for your help !

Kalmat commented 1 year ago

Hi!

If you don't have to stick to version 3.7 (which, in addition, has reached end-of-life and is no longer supported), I think that just upgrading to Python 3.10 the problem will be solved.

Please, let me know if this works in your case.

eliascarella commented 1 year ago

Yes that was it, thanks !