Hello World with pywin

H

Helge Stenstrom

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
 
D

Dennis Reinhardt

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.

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.
 
T

Thomas Heller

Dennis Reinhardt said:
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.

This 'program'

"""
import os
from ctypes import windll

windll.user32.MessageBoxA(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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top