In 2004 Creative Commons began to expand their offerings to include client applications. The applications were intended to promote and complement the licenses offered by Creative Commons. After evaluating other languages, Python was chosen as the primary development language, and wxPython was chosen as the user interface toolkit. ccPublisher is the outgrowth of these early decisions. Today the Creative Commons is preparing to ship ccPublisher 1.0 on Mac OS X, Windows, and Linux. Python and wxPython, along with a fair amount of code manipulation, have enabled us to create a single code base for all three platforms. This code base, along with a set of build tools which are also being released as Open Source software, allow developers to focus on writing quality applications which integrate well and look “right” on all platforms. The overriding goal has been to isolate platform-specific code and settings, in an effort to share as much code as possible. This presentation will focus on the non-intuitive aspects of cross-platform development with Python and wxPython. We all know that Python is available for a wide variety of platforms, but what goes into creating an application that doesn’t require end-users to be aware of dependencies or languages? In particular, this presentation will cover handling platform-specific GUI idioms (Mac OS X menu bars, drag and drop on all platforms, etc), creating distributions of your application (MSI for Windows, DMG for OS X, RPM/DEB for Linux) which bundle all the necessary dependencies and which install seamlessly, and inconsistencies and problem areas we have encountered during the development of our applications. The presentation will also present some “best practices” developed during the project which have proven useful in minimizing the effort required to add features and refactor a cross platform application. This presentation will be of interest to any Python developer considering developing end user applications with Python. It would also be useful for developers looking for easier ways to manage their building and distribution process.
- Location: PyCon 2005, ACCU 2005
This talk will discuss the process of building a cross-platform desktop application using Python and wxPython. It will pull extensively from my experience in developing ccPublisher, a cross-platform application for publishing media to the Internet Archive. Slides are now available online.
I’ll be presenting this talk at the Py UK track of the ACCU conference in April. Due to a longer time allotment and based on feedback from Py Con attendees, I am presenting an expanded, more detailed version of the talk. I’ll be focusing on what goes into creating a wxPython application, as well as what goes into packaging one. Py Con feedback was clear that many users are as interested in the wxPython bits as the packaging/distribution bits.
Due to the complexity of ccPublisher, I don’t believe using it as a live demo of how code to build an app is going to be very beneficial for attendees. Therefore I’m going to be writing a simple app (the classic Currency Converter example) during the talk. Hopefully this simplified example will be sufficient to demonstrate the core concepts.
Documentation of things we did, things discussed, for my reference and yours.
- wxPython App Lifecycle
- i18n in wxPython
- OS X Specific Stuff
- Handling Static Bitmaps
- Sample setup.py
- Using Wix with Distutils
- Cross Platform Wishlist