Quickly Creating Professional Looking Application Using wxpython, py2exe and InnoSetup. Miki Tebeka mtebeka@qualcomm.com



Similar documents
Graphic Objects and Loading Them into TGF2/MMF2

Python for Series 60 Platform

Installation of ADS SiMKit startup script and designkit on Windows for SiMKit version 4.4

- Python. Get Python from and install on your machine. - py2exe. Get py2exe from

Microsoft Access Calendar Scheduling Database/Template Installation Instructions

PaperStream Connect. Setup Guide. Version Copyright Fujitsu

Trytond Magento Documentation

Install SQL Server 2000 for optimal usability

Magento OpenERP Integration Documentation

Python and Cython. a dynamic language. installing Cython factorization again. working with numpy

Receiver Updater for Windows 4.0 and 3.x

Moxa Device Manager 2.3 User s Manual

Android Setup Phase 2

JetPaySM. JetComSM. Installation Guide

Quick Start Tutorial. Using the TASKING* Software Development Tools with the Intel 8x930 Family Evaluation Board

Installing (1.8.7) 9/2/ Installing jgrasp

Image Management Suite. Mini Thesis. Roland Foster. Supervisors: Mr. Mehrdad Ghaziasgar and Mr. James Connan. B.Sc. Honours

Installing and Running the Google App Engine On Windows

Contacts: , find, and manage your contacts

Shipment Label Header Guide

V-locity Installation

Sage ERP Accpac U.S. Payroll Versions 5.5S, 5.6O and 6.0J Tax Update for June 30, 2012

Avery Wizard: Using the wizard with Microsoft Word. This is a simple step-by-step guide showing how to use the Avery wizard in word

Installing OneStop Reporting Products

Shape 5 Flex Menu Plugin Tutorials

Working with Office Applications and ProjectWise

AR Collections Manager for Microsoft Dynamics SL

Listed below are the common process in creating a new content type, and listing a summary of all contents via view and/or panel custom page.

Multivendor Extension User Guide

Creating PDF Files for Submission of Blackboard Assignments

Sitecore InDesign Connector 1.1

Apple OS / ios Installation Guide Includes MAC OSx and ios based devices

Introduction. Before you begin. Installing efax from our CD-ROM. Installing efax after downloading from the internet

StreamServe Persuasion SP4

Page1. Tera Doty-Blance

EBSCO MEDIA FILE TRANSFER SOFTWARE INSTALLATION INSTRUCTIONS

QuickOPC Examples. Examples-QuickOPC.docx Page 1 of 19

Virto Pivot View for Microsoft SharePoint Release User and Installation Guide

Using FileMaker Pro with Microsoft Office

Code::Block manual. for CS101x course. Department of Computer Science and Engineering Indian Institute of Technology - Bombay Mumbai

FreeCapture - A PC remote control program for GDS-800

ACTIVE CONTENT MANAGER (ACM)

Introduction to R Statistical Software

Learn how to create web enabled (browser) forms in InfoPath 2013 and publish them in SharePoint InfoPath 2013 Web Enabled (Browser) forms

How to Edit an . Here are some of the things you can do to customize your

Spotify Homepage Takeover

ProSystem fx Document (On-Premise)

Installation & User Guide

Homework 9 Android App for Weather Forecast

Uninstallation Guide Funding Information System (FIS)

Integration and Streaming Guide

FAST-START GUIDE FOR ADMINISTRATOR - ECOMMERCE

Creating an eportfolio Using Google Sites

Qlik Sense Desktop. Qlik Sense Copyright QlikTech International AB. All rights reserved.

Web Development Tutorials Web Design: WiX. Tutorial 1-3a

ACTIVE DIRECTORY DEPLOYMENT

IBM TCP/IP Network Port Monitor

Installation Guide. (You can get these files from

OutDisk 4.0 FTP FTP for Users using Microsoft Windows and/or Microsoft Outlook. 5/1/ Encryptomatic LLC

Getting started with 2c8 plugin for Microsoft Sharepoint Server 2010

How to create a VPN (Virtual Private Network)

Pearl Echo Installation Checklist

How to Back Up and Restore an ACT! Database Answer ID 19211

Running and Scheduling QGIS Processing Jobs

FileMaker Pro and Microsoft Office Integration

How To Configure CU*BASE Encryption

Creating a Website with Google Sites

8911B - Installation & Deployment in Microsoft Dynamics CRM 4.0

Option 1 Using the Undelete PushInstall Wizard.

Ensim WEBppliance 3.0 for Windows (ServerXchange) Release Notes

ENABLE LOGON/LOGOFF AUDITING

DocAve Upgrade Guide. From Version 4.1 to 4.5

Note: With v3.2, the DocuSign Fetch application was renamed DocuSign Retrieve.

Installation & User Guide

Secret Server Installation Windows 8 / 8.1 and Windows Server 2012 / R2

BT Web Hosting. Quick Start

Connect for iphone. Aug, 2012 Ver 5.3b AWest. 1 P age

Universal Management Service 2015

Notepad++ The COMPSCI 101 Text Editor for Windows. What is a text editor? Install Python 3

shweclassifieds v 3.3 Php Classifieds Script (Joomla Extension) User Manual (Revision 2.0)

BRIC VPN Setup Instructions

How to Import Microsoft Access Databases into FmPro Migrator

Introduction to Android Development

Create a PDF File. Tip. In this lesson, you will learn how to:

Work with the TeacherLists School Supply Lists App

How To Deploy Lync 2010 Client Using SCCM 2012 R2

X-POS GUIDE. v3.4 INSTALLATION SmartOSC and X-POS

How to Create an Android Application using Eclipse on Windows 7

WorldShip Import Shipment Data

File Manager Pro User Guide. Version 3.0

Shopping Cart Add-On Help. for. Price Comparison Script. April 9, 2015

Xuan (The STACK Box) Application Development. Xuan (The STACK Box) Application Development

NetIQ Advanced Authentication Framework - Password Filter. Installation Guide. Version 5.1.0

LEARNING RESOURCE CENTRE GUIDE TO OFFICE 365

Agents Hands-On Exercises. Agent Hands On Exercise

Office 365 SharePoint Setup and Admin Guide

How To Restore Your Data On A Backup By Mozy (Windows) On A Pc Or Macbook Or Macintosh (Windows 2) On Your Computer Or Mac) On An Pc Or Ipad (Windows 3) On Pc Or Pc Or Micro

ProDoc Tech Tip Creating and Using Supplemental Forms

StrikeRisk v6.0 IEC/EN Risk Management Software Getting Started

How to Open a Broker Account & Install MetaTrader4 on a Mac

Transcription:

Quickly Creating Professional Looking Application Using wxpython, py2exe and InnoSetup Miki Tebeka mtebeka@qualcomm.com

About Me Software Process Engineer in Qualcomm Israel Started using Python around 1998 Use Python wherever I can Currently around 90%+ of my code is in Python Written from small scripts to a linker and a source level GUI debugger Little activity in Python development Also wxpython, PLY,...

Why Should You Provide GUI + Installer? Users expect certain way of using and installing programs Shockingly, not all of them like the command line Good for your karma It will make you look good with little effort It will sell Python better for your next project Wrapping is important Just make sure the content is good as well :)

About This Talk I'll try to show that it is very simple to create a professional looking application We'll write a demo untar program It can serve you as a template for similar projects

wxpython Can be found at www.wxpython.org Python bindings for www.wxwidgets.org Cross platform GUI library C++ Borland next GUI framework Very rich set of widgets Keeps growing all the time Killer demo Sometimes I just cut&paste from it Has several GUI designers

Library Tour

Basic Concepts Create a container window Use a sizer to place child widgets Very much like Tcl/Tk pack There are other layout options Bind event to actions using Bind You are aware that GUI programming is event based? Create wxpysimpleapp to run the application

Demo Application - UnTar Open a tar file to a given directory Checks for user input validity...

GUI Design Draw it in boxes by hand

Design To Code sizer = wx.boxsizer(wx.vertical) # Main sizer # Tar File: [Browse] self._filename =... sizer.add(self._filename, 0, wx.expand) # Output Directory: [Browse] self._outdir =... sizer.add(self._outdir, 0, wx.expand) # ---------- sizer.add(wx.staticline...)

Design To Code (cont.) # [Extract] [Cancel] hsizer = wx.boxsizer(wx.horizontal) b =... hsizer.add(b) hsizer.add((1,1), 1, wx.expand) # Spacer hsizer.add(wx.button(self, wx.id_cancel)) sizer.add(hsizer, 1, wx.expand) # Layout window self.setsizer(sizer) self.setautolayout(1) sizer.fit(self)

FileBrowseButton (from wx.lib.filebrowsebutton) FILEMASK = "Tar Files *.tar;*.tgz;" \ "*.tar.gz;*.tar.bz2 " \ "All Files *.*" self._filename = FileBrowseButton(self, -1, labeltext = "Tar File:", filemask = FILEMASK, filemode = wx.open wx.file_must_exist, size=(width, -1))

Button b = wx.button(self, -1, "Extract") self.bind(wx.evt_button, self.onextract, b) def OnExtract(self, evt): '''Handle "Extract" click'''...

Add An Icon So they will remember it Choose something easy and colorful Take a look at www.openclipart.org More than 2489 images in public domain if isfile(iconfile): icon = wx.icon(iconfile, wx.bitmap_type_ico) self.seticon(icon)

Running # MAIN if name == " main ": app = wx.pysimpleapp() dlg = UnTarDlg() dlg.showmodal() dlg.destroy()

py2exe Can be found at www.py2exe.org Packs all needed scripts and dynamic libraries in one place Adds an executable to run the program Not 100% compatible to running python myscript.py See appdir in untar.py Can embed icon in executable Output is in dist directory Windows only :( Check out cx_freeze for other platforms

Setup File (setup.py) from distutils.core import setup import py2exe setup( windows = [ { "script": "untar.py", "icon_resources": [(1, "tar.ico")] } ])

Use an Installer Why can't we just ship the a zip file? You can However users are used to a certain way of installing new applications There are many out there InnoSetup (which we'll use) NSIS (from the guys who gave us Winamp) WiX (open source from Microsoft)...

InnoSetup Can be found at www.jrsoftware.org/isinfo.php Actively developed with a helpful community Pascal based scripting Can create uninstaller Can install from command line

InnoSetup Script [Setup] AppName = UnTar AppVerName = UnTar version 0.1 DefaultDirName = {pf}\untar DefaultGroupName = UnTar OutputBaseFilename = UnTarSetup [Files] Source: "dist\*"; DestDir: {app} Source: "tar.ico"; DestDir: {app}

InnoSetup Script (cont.) [Icons] Name: "{group}\untar"; FileName: "{app}\untar.exe" Name: "{group}\uninstall"; FileName: "{app}\{uninstallexe}"

Putting It all Together In a Makefile of course :) Can get one from http://www.gnu.org/software/make/ http://www.cygwin.com/ http://unxutils.sf.net/ http://www.mingw.org/ I use two utilities to find where python and InnoSetup are installed Also used for cleanup

To Sum Up Created a GUI based application with installer Took me less than two hours All in 281 LOC Including comments Including Makefile and other supplementary files Small price to impress your users

Resources WxPython www.wxpython.org py2exe http://starship.python.net/crew/theller/py2exe/ InnoSetup http://www.jrsoftware.org/isinfo.php OpenClipart http://www.openclipart.org/

Questions?