How do I make Windows Application with Python ?

Doug Holton a at b.c
Wed Jan 5 18:22:24 CET 2005

> Thanks all for very detailed answers. BTW I tried this one but it seems
> that it doesn't use VS'es visual designer. Also it doesn't have "build"
> option so it is basicly only usefull to higlight Python syntax.
> Active Sate Komodo looks like much better choice

I don't know of any python IDE with a visual designer and a build to exe 

But since you are familiar with Visual Studio and you are developing on 
Windows, you might check out the free SharpDevelop IDE:

Then unzip this boo add-in into the SharpDevelop folder under Program 

Then you can start up SharpDevelop, create a new boo project, press the 
green play button, and your exe will be built and executed (the one 
below is only 4kb in size).  We are working on adding support for 
SharpDevelop's visual form designer soon.

To show a Windows message box instead of printing to the console like 
you were asking earlier, you can use code like this:

import System.Windows.Forms
MessageBox.Show("your message")

Or for a more complete windows app:

import System.Drawing
import System.Windows.Forms

class MainForm(Form):
	def constructor():
		self.Text = "My Window"
		b = Button(Text: "Click Me")
		b.Location = Point(100,75)
		b.Click += def():
			MessageBox.Show("Button clicked")
		#b.Click += OnButtonClick


	def OnButtonClick():
		MessageBox.Show("Button clicked")

f = MainForm()

More information about the Python-list mailing list