Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > How do I make Windows Application with Python ?

Reply
Thread Tools

How do I make Windows Application with Python ?

 
 
Fuzzyman
Guest
Posts: n/a
 
      01-04-2005
You need py2exe to bundle applications so they can be used on machines
without python. When you do that you have a choice of whether or not
your application should have a console box or not. In order to use
buttons and other widgets you will need to choose a GUI toolkit. I
recommend starting with Tkinter - but others would recommend wxPython.
Regards,

Fuzzy
http://www.voidspace.org.uk/python/index.shtml

 
Reply With Quote
 
 
 
 
BOOGIEMAN
Guest
Posts: n/a
 
      01-04-2005
On Mon, 03 Jan 2005 19:56:10 -0600, Rob Emmons wrote:

> I believe also if you want to use MS Visual Studio -- Active State sells
> python programming tools that plug into MS Visual Studio if you want to do
> that. I've not tried these so I don't know how they work or if they are
> any good.


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
 
Reply With Quote
 
 
 
 
Fuzzyman
Guest
Posts: n/a
 
      01-05-2005
Couple of corrections - neither pypy nor starkiller are compilers.
Starkiller isn't available yet and *may* be helpful in building
compilers. Pyrex is an alternative language - a python/C hybrid that
can be compiled.

If you want to release an application then innosetup, starkit, and upx
might help - but they're not python related. You will need something
like py2exe, cx_freeze, or mcmillan installer. (Which are specific to
python - py2exe seems to be the more mature tool).

Alternatively you could consider 'Movable Python' - a frozen
distribution of python that doesn't need isntalling. See
http://sourceforge.net/projects/movpy
Regards,

Fuzzy
http://www.voidspace.org.uk/python/index.shtml

 
Reply With Quote
 
Doug Holton
Guest
Posts: n/a
 
      01-05-2005
BOOGIEMAN wrote:
> 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
option.

But since you are familiar with Visual Studio and you are developing on
Windows, you might check out the free SharpDevelop IDE:
http://www.icsharpcode.net/OpenSource/SD/

Then unzip this boo add-in into the SharpDevelop folder under Program
Files: http://coedit.net/boo/BooBinding.zip

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")
#or:
#b.Click += OnButtonClick

self.Controls.Add(b)

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


f = MainForm()
Application.Run(f)
 
Reply With Quote
 
Rob Emmons
Guest
Posts: n/a
 
      01-07-2005
On Wed, 05 Jan 2005 04:49:05 -0800, Fuzzyman wrote:

> Couple of corrections - neither pypy nor starkiller are compilers.
> Starkiller isn't available yet and *may* be helpful in building
> compilers. Pyrex is an alternative language - a python/C hybrid that
> can be compiled.
>
> If you want to release an application then innosetup, starkit, and upx
> might help - but they're not python related. You will need something
> like py2exe, cx_freeze, or mcmillan installer. (Which are specific to
> python - py2exe seems to be the more mature tool).
>
> Alternatively you could consider 'Movable Python' - a frozen
> distribution of python that doesn't need isntalling. See
> http://sourceforge.net/projects/movpy


Great summary. I was hoping someone would fill in the blanks. I've been
interested in this area for some time -- but have not had time to look
into it more than keep a list of interesting projects I wanted to research
in the future. I'll add your comments to my list.

Again, thanks.

Rob

 
Reply With Quote
 
goldmund99 goldmund99 is offline
Junior Member
Join Date: Oct 2009
Posts: 1
 
      10-05-2009
Go to oneminutepython .com, it contains a simple tutorial and a template application to develop cross platform gui apps in a few minutes!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
How to test python extension modules during 'make check' / 'make distcheck'? Mark Asbach Python 1 11-03-2006 02:29 AM
how to make a 32bit application use more than 2GB RAM on 64bit Windows 2003 chaojen.chen@gmail.com Windows 64bit 8 09-05-2006 01:42 PM
Porting Java web application to Python to make it faster? Wolfgang Keller Python 14 07-14-2004 06:13 PM
How do I make a native windows client application in vc++6.0 talk to .net web service Raj ASP .Net Web Services 0 07-31-2003 12:11 AM



Advertisments