By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,089 Members | 2,260 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,089 IT Pros & Developers. It's quick & easy.

Hello World with pywin

P: n/a
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
Jul 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
> 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.
--
Dennis Reinhardt
De*****@dair.com http://www.spamai.com?ng_asp
Jul 18 '05 #2

P: n/a
"Dennis Reinhardt" <De*****@dair.com> writes:
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.


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
Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.