Python27 Aug 2008 08:05 pm

In this article, I am going to go over the steps needed to package up my program, wxPyMail, so I can distribute it to other Windows users. I will be using Andrea Gavana’s excellent GUI2Exe utility for creating an executable and I’ll use Inno Setup to create an installer. I’ve been told that Andrea is working on a new version of his application, so when it comes out I’ll re-work this article for that version and post it too.


Continue Reading »

Python and wxPython16 Aug 2008 12:33 pm

I thought it would be a good idea to write a sample application in wxPython to show how to put all the pieces together and make something useful. At my day job, I created a little program to send emails because we had a lot of users that missed the mailto functionality that we lost when we switched from Exchange/Outlook to Zimbra. It should be noted that this is a Windows only application currently, but it shouldn’t be too hard to make it more OS-agnostic.

I’ll split this article into three pieces: First is creating the interface; second is setting up the data handling and third will be creating a Windows executable and connecting it to the mailto handler.
Continue Reading »

Cross-Platform and Python and wxPython02 Aug 2008 01:13 pm

Lately on the wxPython mailing list, there’s been a fair amount of traffic on changing the mouse icon. In this article I will describe different ways to manipulate the cursor with wxPython. To follow along, I recommend that you download Python 2.4 or higher and wxPython 2.8.x.


Continue Reading »

Cross-Platform and Python and wxPython02 Jul 2008 07:27 am

Menus and toolbars are used in just about every modern program in existence, barring the ones that only run from the command line. In this post, we’ll learn how to create them using the wxPython toolkit. Here’s what you’ll need to follow along:


Continue Reading »

Cross-Platform and Python and wxPython11 Jun 2008 06:52 am

When I create an application, I usually want to include an “About” box to let the user know more about the application, myself and to give shout outs to anyone who may have helped in the creation of my program. One cool feature wxPython provides is a custom AboutBox widget. I think it looks a little odd, so I created my own About box using the HtmlWindow widget. However, I’ll show how to do it both ways in this article.


Continue Reading »

Python and Windows and wxPython09 Jun 2008 09:15 pm

About a week ago, I wrote that I was working on a sample application that I would be posting here. As I worked on it, I realized that I needed to figure out a way to break it up in a way that was simple, organized and generic. Thus, I decided to create a series of “how-to” articles on the bits and pieces of my application and post them here. Then I will post another article that walks through putting all the pieces together.

The pieces for this application include the following:

  • The wx.BoxSizer
  • The wx.Dialog class
  • The wx.Menu, wx.StatusBar and wx.Toolbar
  • The wx.AboutBox

Note: I already have a BoxSizer tutorial done.

I think that covers the main wxPython bits. I will also be using the standard Python 2.5 library’s email, urllib and smtplib modules as well as a few win32 specific modules. I think you will find this set of articles quite educational. Please be sure to let me know what you think.

Python and wxPython29 May 2008 06:58 am

As planned, I copied some of my tutorials to the official wxPython wiki. Currently I only have the sizer tutorials over there.

I am working on a series that will show how to build a simple application from the ground up. Hopefully I can take the bits and pieces of it and make it easy to follow. If so, I’ll post the bits and pieces to the wiki too, after I get some feedback so I can shine them up a bit.

You should be seeing the first post of that series soon. Hopefully by the weekend.

Cross-Platform and Python and wxPython23 May 2008 09:05 pm

I received a question about how to put an image in my frame’s toolbar on Windows. As it is, the toolbar just uses a generic icon. There are three ways that I am aware of. The first is to get an embedded image out of an executable. The second is to take some image you have and just embed it. The last way is to take your image and turn it into a Python file that can be imported. I’m sure you could also mess with PIL or maybe even use the paint handler, but I don’t know that stuff.


Continue Reading »

Cross-Platform and Python and wxPython22 May 2008 06:08 pm

In this tutorial, I will take my code from the GridSizer tutorial I wrote the other day and heavily modify it to display oddly shaped widgets in a GridBagSizer. The GridBagSizer is the most complex of the sizers. It subclasses the FlexGridSizer, so you can use all of it’s parent’s methods as well as those that the GridBagSizer adds. See the docs or use Python’s help() functionality for more information on said methods.


Continue Reading »

Python21 May 2008 07:00 am

In my last post, I wrote how to use a GridSizer to create a generic form. Unfortunately, the wx.TextCtrls all ended up looking fat. It seems that passing a wx.EXPAND flag to the GridSizer when adding the TextCtrl causes it to expand to fill the cell as well as resize when the window itself is resized.


Continue Reading »

Next Page »