Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Why no maintained wrapper to Win32?

118 views
Skip to first unread message

Gilles Ganault

unread,
Jul 28, 2007, 11:18:38 AM7/28/07
to
Hello

It looks like the development of the PyWin32 wrapper to the
Win32 API stopped years ago, which is too bad because it means that
writing GUI apps in Python even just for Windows means adding
megabytes when using eg. wxWidgets.

How come no one too over this project, or offered another wrapper? Or
even better, why no company offered a RAD IDE so that we could write
GUI apps in Python for Windows? It's such a waste not being apple to
just send someone a small EXE.

Thanks.

"Martin v. Löwis"

unread,
Jul 28, 2007, 12:05:34 PM7/28/07
to
> It looks like the development of the PyWin32 wrapper to the
> Win32 API stopped years ago, which is too bad because it means that
> writing GUI apps in Python even just for Windows means adding
> megabytes when using eg. wxWidgets.

Why does it mean that? The Win32 APIs for GUI are up-to-date; they
don't need further development. Win32 itself stopped years ago.
You can write GUI applications with PyWin32 just fine.

Regards,
Martin

Gilles Ganault

unread,
Jul 28, 2007, 7:29:36 PM7/28/07
to
On Sat, 28 Jul 2007 18:05:34 +0200, "Martin v. Löwis"
<mar...@v.loewis.de> wrote:
>Why does it mean that? The Win32 APIs for GUI are up-to-date; they
>don't need further development. Win32 itself stopped years ago.
>You can write GUI applications with PyWin32 just fine.

Besides the total lack of documentation, you mean that nothing was
added to the Win32 API since PyWin32 was last updated?

"Martin v. Löwis"

unread,
Jul 29, 2007, 12:40:35 AM7/29/07
to
>> Why does it mean that? The Win32 APIs for GUI are up-to-date; they
>> don't need further development. Win32 itself stopped years ago.
>> You can write GUI applications with PyWin32 just fine.
>
> Besides the total lack of documentation, you mean that nothing was
> added to the Win32 API since PyWin32 was last updated?

Why do you say that the Win32 API lacks documentation? I find the
documentation at msdn.microsoft.com to be quite useful.

Yes, there haven't been many changes to Win32 in recent years (there
haven't been many system releases in the first place). Most additions
did not concern GUI programming, which is what you were after, and
even those that are recent additions are rather rarely needed, so
you likely won't miss them. If you do, ask Mark Hammond to add them.

Regards,
Martin

Gilles Ganault

unread,
Jul 29, 2007, 5:28:46 PM7/29/07
to
On Sun, 29 Jul 2007 06:40:35 +0200, "Martin v. Löwis"
<mar...@v.loewis.de> wrote:
>Why do you say that the Win32 API lacks documentation? I find the
>documentation at msdn.microsoft.com to be quite useful.

No, I meant documentation on how to write Win32 apps using PyWin.

>Yes, there haven't been many changes to Win32 in recent years (there
>haven't been many system releases in the first place). Most additions
>did not concern GUI programming, which is what you were after, and
>even those that are recent additions are rather rarely needed, so
>you likely won't miss them.

Makes sense. Do you know of good places to hang around when looking
for information on writing Win32-based GUI apps in Pythons (web
forums, mailing lists, etc.)?

Thank you.

sturlamolden

unread,
Jul 29, 2007, 10:33:40 PM7/29/07
to
On Jul 29, 1:29 am, Gilles Ganault <nos...@nospam.com> wrote:

> Besides the total lack of documentation,

You mean 'total lack of documentation' besides Mark Hammond's O'Reilly
book on Windows programming in Python?

Not to mention MSDN, Charles Petzold's book, and other sources of
Win32 API and MFC documentation?

Gilles Ganault

unread,
Jul 30, 2007, 12:07:36 AM7/30/07
to
On Sun, 29 Jul 2007 19:33:40 -0700, sturlamolden
<sturla...@yahoo.no> wrote:
>You mean 'total lack of documentation' besides Mark Hammond's O'Reilly
>book on Windows programming in Python?

Sorry, I thought that book was way outdated because it uses Python
1.5.

>Not to mention MSDN, Charles Petzold's book, and other sources of
>Win32 API and MFC documentation?

For people who don't konw the Win32 API and don't know C... is the
O'Reilly book above the best source of information on how to write
Win32 GUI apps in Python?

Thanks.

sturlamolden

unread,
Jul 30, 2007, 12:49:04 AM7/30/07
to
On Jul 30, 6:07 am, Gilles Ganault <nos...@nospam.com> wrote:

> For people who don't konw the Win32 API and don't know C... is the
> O'Reilly book above the best source of information on how to write
> Win32 GUI apps in Python?

Why inflict suffering on yourself with MFC when you can use wxPython
or PyGTK?

Sure, you could use ctypes to make calls into user32.dll, gdi32.dll
and kernel32.dll. Then you can program Python GUIs using the plain
Win32 API, avoiding PyWin32's MFC or wxPython. But who would do such a
thing?

Gilles Ganault

unread,
Jul 30, 2007, 10:35:55 PM7/30/07
to
On Sun, 29 Jul 2007 21:49:04 -0700, sturlamolden
<sturla...@yahoo.no> wrote:
>Why inflict suffering on yourself with MFC when you can use wxPython
>or PyGTK?

Because I'd like to avoid having to pack several MB + having to
install the toolkit. Considering the size of the typical Python
script, it seemed overkill.

>Sure, you could use ctypes to make calls into user32.dll, gdi32.dll
>and kernel32.dll. Then you can program Python GUIs using the plain
>Win32 API, avoiding PyWin32's MFC or wxPython. But who would do such a
>thing?

So the PyWin32 interface doesn't make it easier to program Win32 GUI
apps? It's just C that looks like Python?

Guess I have the answer as to no one seems to write GUI apps for
Windows natively :-)

Thanks.

"Martin v. Löwis"

unread,
Jul 31, 2007, 1:38:36 AM7/31/07
to
> Guess I have the answer as to no one seems to write GUI apps for
> Windows natively :-)

That's certainly an important factor. If I wanted to ship a small
application, I would write a web server, and run that locally.
GUI programming is so last-century :-)

Regards,
Martin

Bruno Desthuilliers

unread,
Jul 31, 2007, 8:46:00 AM7/31/07
to
Gilles Ganault a écrit :

For the Win32 part, there's a dedicated newsgroup in the comp.*
hierarchy (sorry, can't remember the exact name, but you shouldn't have
problems finding it).

For the Python part, I'd say you're at the right place.

Bruno Desthuilliers

unread,
Jul 31, 2007, 8:53:18 AM7/31/07
to
Gilles Ganault a écrit :

> On Sun, 29 Jul 2007 21:49:04 -0700, sturlamolden
> <sturla...@yahoo.no> wrote:
>> Why inflict suffering on yourself with MFC when you can use wxPython
>> or PyGTK?
>
> Because I'd like to avoid having to pack several MB + having to
> install the toolkit. Considering the size of the typical Python
> script, it seemed overkill.
>
>> Sure, you could use ctypes to make calls into user32.dll, gdi32.dll
>> and kernel32.dll. Then you can program Python GUIs using the plain
>> Win32 API, avoiding PyWin32's MFC or wxPython. But who would do such a
>> thing?
>
> So the PyWin32 interface doesn't make it easier to program Win32 GUI
> apps?

Did you ever tried writing a Win32 GUI app in C ?-)

But you should re-read the above more carefully. What I do understand
from it is that PyWin32 adds support for the MFC toolkit (nb: didn't
check myself since I'm not concerned...).

> It's just C that looks like Python?
>
> Guess I have the answer as to no one seems to write GUI apps for
> Windows natively :-)

Fact is that either the app is a small, casual tool, and then Tkinter is
quite enough, or it's a real, fullblown app and then better to use a
decent (and, if possible, crossplatform) toolkit - like, you know,
wxWidgets !-)

sturlamolden

unread,
Jul 31, 2007, 3:53:05 PM7/31/07
to
On Jul 31, 4:35 am, Gilles Ganault <nos...@nospam.com> wrote:

> Because I'd like to avoid having to pack several MB + having to
> install the toolkit. Considering the size of the typical Python
> script, it seemed overkill.

But you are happy to pack a Python runtime and PyWin32? This is really
a dumb argument.


> >Sure, you could use ctypes to make calls into user32.dll, gdi32.dll
> >and kernel32.dll. Then you can program Python GUIs using the plain
> >Win32 API, avoiding PyWin32's MFC or wxPython. But who would do such a
> >thing?

> So the PyWin32 interface doesn't make it easier to program Win32 GUI
> apps? It's just C that looks like Python?

PyWin32 wraps MFC, which is a C++ library for Windows (and Motif) GUI
programming. It is not more 'native' than wxPython. MFC and wxWidgets
does the same job, except that wxWidgets does it better.

PyWin32 does not expose the GUI parts of the 'native' Win32 API
directly. You will have to use ctypes to access that directly.

> Guess I have the answer as to no one seems to write GUI apps for
> Windows natively :-)

wxPyhton is 'native' enough. Is uses native widgets on Windows (unlike
Qt, GTK and tk).

0 new messages