How to create a Win32 Hello World with Python?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rlee3828
    New Member
    • Nov 2006
    • 2

    #1

    How to create a Win32 Hello World with Python?

    Hi folks :
    I am a Linux device driver guy, I believe Python/Perl style language is going to be my future. So I am exploring Python Win32, now the first thing is Hello world, does anybody know how to create a Win32 Hello World with Python?
  • bartonc
    Recognized Expert Expert
    • Sep 2006
    • 6478

    #2
    Since you're on Linux, wouldn't you rather write portable code using (say) Tkinter or wxPython?... Unless you want to get into the guts of MS bloat... I normally only use win32 if there's no other way (I write apps for windows).

    Comment

    • rlee3828
      New Member
      • Nov 2006
      • 2

      #3
      Originally posted by bartonc
      Since you're on Linux, wouldn't you rather write portable code using (say) Tkinter or wxPython?... Unless you want to get into the guts of MS bloat... I normally only use win32 if there's no other way (I write apps for windows).
      Thank you for replying, actually I am not familiar to Tkinter neither, well I did run into some wxPython resources but Win32 is more popular, right? I am exploring this Python-Windows possibility, next thing is going to be directpython, that is my destination.

      Comment

      • bartonc
        Recognized Expert Expert
        • Sep 2006
        • 6478

        #4
        Originally posted by rlee3828
        Thank you for replying, actually I am not familiar to Tkinter neither, well I did run into some wxPython resources but Win32 is more popular, right? I am exploring this Python-Windows possibility, next thing is going to be directpython, that is my destination.
        Mark Hammond has done a great service by providing python wrappers to the extensive (bloat, imho) windows win32 API. The COM modules are invaluable for interacting with other apps. There are lots of examples in the docs. That said, documentation of the API itself seems to be left to MS docs (have you ever tried to look up something in an MS manual?).
        If you get Stani's Python Editor (http://pythonide.stani.be/) as an example of what wxPython can do, I believe you will see that a minimalist approach to GUI toolkits is more than adequate (it's ideal, imho). There also "hello world" examples for wx (Windows, X (Mac too)) Python.
        Tkinter documentation in python manuals is minimal. There's some on the web and a book or two have been published.

        Comment

        • kudos
          Recognized Expert New Member
          • Jul 2006
          • 127

          #5
          maybe som of us should sit down and do a Tkinter book ;-)

          -kudos

          Originally posted by bartonc
          Mark Hammond has done a great service by providing python wrappers to the extensive (bloat, imho) windows win32 API. The COM modules are invaluable for interacting with other apps. There are lots of examples in the docs. That said, documentation of the API itself seems to be left to MS docs (have you ever tried to look up something in an MS manual?).
          If you get Stani's Python Editor (http://pythonide.stani.be/) as an example of what wxPython can do, I believe you will see that a minimalist approach to GUI toolkits is more than adequate (it's ideal, imho). There also "hello world" examples for wx (Windows, X (Mac too)) Python.
          Tkinter documentation in python manuals is minimal. There's some on the web and a book or two have been published.

          Comment

          • bartonc
            Recognized Expert Expert
            • Sep 2006
            • 6478

            #6
            Originally posted by kudos
            maybe som of us should sit down and do a Tkinter book ;-)

            -kudos
            How 'bout a PyWin book?

            Comment

            • kudos
              Recognized Expert New Member
              • Jul 2006
              • 127

              #7
              Hi, good idea, but I think there is a PyWin book already (written by the man himself)



              I don't think there are too many Tkinter book though (I recall one), but im not sure anybody is using the library..

              -kudos



              Originally posted by bartonc
              How 'bout a PyWin book?

              Comment

              • bartonc
                Recognized Expert Expert
                • Sep 2006
                • 6478

                #8
                Originally posted by kudos
                Hi, good idea, but I think there is a PyWin book already (written by the man himself)

                -kudos
                Wow! I hadn't seen that one. Great tip kudos! Thanks,
                Barton

                Comment

                • bartonc
                  Recognized Expert Expert
                  • Sep 2006
                  • 6478

                  #9
                  Originally posted by rlee3828
                  Hi folks :
                  I am a Linux device driver guy, I believe Python/Perl style language is going to be my future. So I am exploring Python Win32, now the first thing is Hello world, does anybody know how to create a Win32 Hello World with Python?
                  There is sample code in a folder (on my system it's)
                  D:\Python25\Lib \site-packages\python win\pywin\Demos

                  Comment

                  • bartonc
                    Recognized Expert Expert
                    • Sep 2006
                    • 6478

                    #10
                    Originally posted by kudos
                    Hi, good idea, but I think there is a PyWin book already (written by the man himself)



                    I don't think there are too many Tkinter book though (I recall one), but im not sure anybody is using the library..

                    -kudos
                    Yikes! $169.67 New! Ouch. Probably worth it though, and Mr. Hammond certainly deservers to make some money for all the work he has done.

                    Comment

                    • Subsciber123
                      New Member
                      • Nov 2006
                      • 87

                      #11
                      If you want to easily create a GUI, use wxPython as the GUI module.
                      PythonCard is a very easy to use GUI builder for wxPython.

                      Comment

                      • bartonc
                        Recognized Expert Expert
                        • Sep 2006
                        • 6478

                        #12
                        Originally posted by Subsciber123
                        If you want to easily create a GUI, use wxPython as the GUI module.
                        PythonCard is a very easy to use GUI builder for wxPython.
                        So true! I use wx + Boa Constructor. I'm always glad to see people using wx.

                        Comment

                        Working...