wxPython: Wrap Widgets with WrapSizer

wxPython 2.9 introduced the world to a new type of sizer that can take widgets and automatically make them “wrap” around as you resize the frame. That sizer is known as wx.WrapSizer. For some reason, it is relatively unknown, so we’ll spend a few minutes going over how to use it in this article. To […]

wxPython: Wrap Widgets with WrapSizer Read More »

How to Create “Immutable” Classes in Python

I’ve been reading a lot about Python’s magic methods lately and recently read about a couple of ways to create an immutable class. An immutable class does not allow the programmer to add attributes to an instance (i.e. monkey patch). It’s a little easier to understand if we actually look at a normal class first.

How to Create “Immutable” Classes in Python Read More »

Real Python: Advanced Web Development Preview Chapter

The Real Python: Advanced Web Development, featuring Django 1.6 KickStarter campaign released a preview chapter today called “Software Craftmanship”. It is the first chapter from the book. The PDF download consists of 33 pages. You can go get it too by going to the following address: http://www.realpython.com/preview/. If you haven’t already, you can still support

Real Python: Advanced Web Development Preview Chapter Read More »

Top Ten Articles of 2013

Happy New Year! It’s the end of 2013 and the beginning of 2014, so it’s time to see which articles made it into the top ten list this year. I ran the statistics on December 31st and came up with the following list: Python: A Simple Step-by-Step SQLite Tutorial (37,658 page views) Python 101: How

Top Ten Articles of 2013 Read More »

eBook Review: Kivy – Interactive Applications in Python

I recently received a copy of Kivy: Interactive Applications in Python by Roberto Ulloa. This is currently the only book about Kivy. Kivy is a cross-platform GUI toolkit that will run on Linux, Windows, and OS X as well as Android and iOS. In fact, the people behind Kivy emphasize that this is aimed primarily

eBook Review: Kivy – Interactive Applications in Python Read More »

wxPython 201: Syncing Scrolling Between Two Grids

This week I saw a question on StackOverflow about putting two grids into a SplitterWindow which itself was in a Notebook page. Personally I think that’s a little convoluted, but I thought it was an interesting challenge and I came up with a solution. Then the fellow wanted to know how to sync the scrolling

wxPython 201: Syncing Scrolling Between Two Grids Read More »

A new Python Kickstarter Project: Advanced Web Development, featuring Django 1.6

Last night I received an email about a new Python-related Kickstarter. The Real Python crew added a new author to write a book entirely about Django 1.6. This is a subject that I keep meaning to get into and haven’t had the opportunity to do so. Hopefully by backing this project, I’ll finally learn Django.

A new Python Kickstarter Project: Advanced Web Development, featuring Django 1.6 Read More »

wxPython: ObjectListview – How to Double-click items

The other day I was working on a project where I was using the fabulous ObjectListView widget (a wrapper around wx.ListCtrl) and I wanted to add the ability to double-click an item in the control to make it open a PDF. I knew I had read somewhere on the internet about how do this sort

wxPython: ObjectListview – How to Double-click items Read More »