[Python-ideas] win32 extensions

Brian Curtin brian.curtin at gmail.com
Wed Sep 14 05:00:23 CEST 2011


On Tue, Sep 13, 2011 at 21:28, Matt Joiner <anacrolix at gmail.com> wrote:
> Do we really need to be encouraging use of Windows APIs in Python?

I don't think we're encouraging anything, nor do I think we need to.
People have already been doing so for quite some time - it's a fact of
life.

If I want to write a tool which uses Windows' ReadDirectoryChangesW
API, how do I do that today? I either write a C extension (which I've
done), or I use pywin32. I must be missing something, because your
question comes off as saying "don't solve that problem".

> Given the greater user base of Windows, is there a danger this could
> encourage the littering of Windows-only "workarounds" in many
> projects?

I don't think the inclusion of this package is going to enlighten
people on the ability to make platform specific workarounds in their
code. They've already been doing this with pywin32 or extension
modules where necessary, and I don't think that's a such bad thing.
Obviously it's great when Python provides a way to solve a
cross-platform problem with one solution, e.g., listing directory
contents, but it's not all sunshine and rainbows. Sometimes working
with those contents requires a platform specific operation.



More information about the Python-ideas mailing list