Why no maintained wrapper to Win32?

Discussion in 'Python' started by Gilles Ganault, Jul 28, 2007.

  1. 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.
    Gilles Ganault, Jul 28, 2007
    #1
    1. Advertising

  2. > 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
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=, Jul 28, 2007
    #2
    1. Advertising

  3. On Sat, 28 Jul 2007 18:05:34 +0200, "Martin v. Löwis"
    <> 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?
    Gilles Ganault, Jul 29, 2007
    #3
  4. >> 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
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=, Jul 29, 2007
    #4
  5. On Sun, 29 Jul 2007 06:40:35 +0200, "Martin v. Löwis"
    <> 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.
    Gilles Ganault, Jul 29, 2007
    #5
  6. Gilles Ganault

    sturlamolden Guest

    On Jul 29, 1:29 am, Gilles Ganault <> 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?
    sturlamolden, Jul 30, 2007
    #6
  7. On Sun, 29 Jul 2007 19:33:40 -0700, sturlamolden
    <> 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.
    Gilles Ganault, Jul 30, 2007
    #7
  8. Gilles Ganault

    sturlamolden Guest

    On Jul 30, 6:07 am, Gilles Ganault <> 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?
    sturlamolden, Jul 30, 2007
    #8
  9. On Sun, 29 Jul 2007 21:49:04 -0700, sturlamolden
    <> 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.
    Gilles Ganault, Jul 31, 2007
    #9
  10. > 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
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=, Jul 31, 2007
    #10
  11. Gilles Ganault a écrit :
    > On Sun, 29 Jul 2007 06:40:35 +0200, "Martin v. Löwis"
    > <> 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


    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, Jul 31, 2007
    #11
  12. Gilles Ganault a écrit :
    > On Sun, 29 Jul 2007 21:49:04 -0700, sturlamolden
    > <> 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 !-)
    Bruno Desthuilliers, Jul 31, 2007
    #12
  13. Gilles Ganault

    sturlamolden Guest

    On Jul 31, 4:35 am, Gilles Ganault <> 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).
    sturlamolden, Jul 31, 2007
    #13
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. someone
    Replies:
    5
    Views:
    674
    Tian Min Huang
    Jul 16, 2003
  2. John
    Replies:
    1
    Views:
    416
    S. Justin Gengo
    Aug 3, 2003
  3. Mr. SweatyFinger

    why why why why why

    Mr. SweatyFinger, Nov 28, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    863
    Mark Rae
    Dec 21, 2006
  4. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,764
    Smokey Grindel
    Dec 2, 2006
  5. Fred
    Replies:
    2
    Views:
    69
    Joe Smith
    Feb 19, 2007
Loading...

Share This Page