An executable Python app *

Question

Python works on multiple platforms and can be used for desktop and web applications, thus I conclude that there is some way to compile it into an executable for Mac, Windows and Linux.

The problem being I have no idea where to start or how to write a GUI with it, can anybody shed some light on this and point me in the right direction please?

Answer

First you will need some GUI library with Python bindings and then (if you want) some program that will convert your python scripts into standalone executables.

Cross-platform GUI libraries with Python bindings (Windows, Linux, Mac)

Of course, there are many, but the most popular that I've seen in wild are:

  • Tkinter - based on Tk GUI toolkit (de-facto standard GUI library for python, free for commercial projects)
  • WxPython - based on WxWidgets (very popular, free for commercial projects)
  • PyQt - based on Qt (also very popular and more stable than WxWidgets but costly license for commercial projects)

Complete list is at http://wiki.python.org/moin/GuiProgramming

Single executable (Windows)

  • py2exe - Probably the most popular out there (PyInstaller is also gaining in popularity)

Single executable (Linux)

  • Freeze - works the same way like py2exe but targets Linux platform

Single executable (Mac)

  • py2app - again, works like py2exe but targets Mac OS
< br > via < a class="StackLink" href=" http://stackoverflow.com/questions/2933/" >An executable Python app< /a>
Share on Google Plus

About Cinema Guy

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment