Hello World with pywin

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Helge Stenstrom

    Hello World with pywin

    I'd like to do something similar to a Hello World program, namely a
    few Windows error messages, as jokes. (Something similar to
    http://shotgun.shacknet.nu:81/noterror.jpg)

    Hopefully, Python is a good tool for this, but I haven't found any
    good examples.

    Can someone point me to Hello World examples with a Windows window,
    some text, and one or two buttons. The Tk logo should not be visible,
    so I suppose that I should use pywin or win32ui or something similar.

    many thanks,
    Helge
  • Dennis Reinhardt

    #2
    Re: Hello World with pywin

    > Can someone point me to Hello World examples with a Windows window,[color=blue]
    > some text, and one or two buttons. The Tk logo should not be visible,
    > so I suppose that I should use pywin or win32ui or something similar.[/color]

    I did a hello world using a browser window without a gui


    AFIK, this is the smallest working Python download at 382 K.
    --
    Dennis Reinhardt
    DennisR@dair.co m http://www.spamai.com?ng_asp


    Comment

    • Thomas Heller

      #3
      Re: Hello World with pywin

      "Dennis Reinhardt" <DennisR@dair.c om> writes:
      [color=blue][color=green]
      >> Can someone point me to Hello World examples with a Windows window,
      >> some text, and one or two buttons. The Tk logo should not be visible,
      >> so I suppose that I should use pywin or win32ui or something similar.[/color]
      >
      > I did a hello world using a browser window without a gui
      > http://www.spamai.com/hello/hello.zip
      >
      > AFIK, this is the smallest working Python download at 382 K.[/color]

      This 'program'

      """
      import os
      from ctypes import windll

      windll.user32.M essageBoxA(None ,
      "Current directory is %s" % os.getcwd(),
      "Hello from python", 0)
      """

      can be run through py2exe and the result packed (after running UPX over
      it) into a 433 k zipfile. It uses the python 2.3 dll, which is somewhat
      larger than 2.2.

      Thomas

      Comment

      Working...