AndreMiras / pycaw

Python Core Audio Windows Library
MIT License
376 stars 67 forks source link

py-win32more would get rid of pycaw.api #96

Open KubaO opened 2 weeks ago

KubaO commented 2 weeks ago

This is a proposal, not a bug report.

Pycaw.api is a hand-crafted ctypes interface to Windows APIs used in pycaw.

There's a machine-generated projection of Windows API (the whole thing) to Python at https://github.com/ynkdir/py-win32more. Removing Pycaw.api and using win32more as a dependency would get rid of a lot of code that has to be maintained. win32more also has an easy-to-use COM wrapper system, so comtypes also wouldn't be needed. It also interfaces with winrt and cleanly handles winrt inheritance should that be needed for any newer APIs.

py-win32more is self-contained and is pure Python. It has no dependencies besides Python itself.

If this would be of interest, I can follow up with a pull request.


I am not associated with the win32more project, just a very happy user.

AndreMiras commented 2 weeks ago

Thank you for the proposal. I didn't know about py-win32more, it's an interesting project indeed. My main concerns are regarding the breaking changes this would introduce and the fact that py-win32more is relatively new (2 years). But having part of the code generated would be the way to go indeed. Let's keep that one open in case others want to chime in