Mike

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 »

wxPython: Adding Tooltips to ObjectListView

Recently I was trying to figure out how to add tooltips to each item in an ObjectListView widget in wxPython on Windows. The wxPython wiki has an example that uses PyWin32, but I didn’t want to go that route. So I asked on the wxPython Google Group and got an interesting answer. They had actually

wxPython: Adding Tooltips to ObjectListView Read More »

Kivy 101: How to Use BoxLayouts

Recently I’ve started learning about Kivy, a Python Natural User Interface (NUI) toolkit. As I understand it, Kivy is kind of a spiritual successor to pyMT, which you can read more about here. In this article, we will be learning how Kivy handles layout management. While you can position widgets using x/y coordinates, in every

Kivy 101: How to Use BoxLayouts Read More »