Best Text Editors for Python development

Python is such a popular language that most “programmers’ text editors” have at least rudimentary support, including syntax highlighting. But there are several editors that have especially good support. I’ve tested the following editors, presented in alphabetical order, as most are fine choices: Emacs Geany Komodo Edit Notepad++

Read More

Intro to PySide/PyQt: Basic Widgets and Hello, World!

This installment gives a introduction to the very most basic points of PySide and PyQt. We’ll talk a bit about the kinds of objects they use, and talk through a couple of very simple examples that will give you a basic idea of how Python/Qt applications are constructed. First, a basic overview of Qt objects. […]

Read More

Install PySide and PyQt on Windows, Mac and Linux

In the last article, I introduced you to Qt and its Python interfaces, PyQt and PySide; now that you know a bit about them, pick one and install it. I recommend PySide for two reasons: first, this tutorial is conceived in terms of PySide, and may cover a few topics that are less fully-implemented in […]

Read More

Python Decorators Overview

Decorators in Python seem complicated, but they’re very simple. You’ve probably seen them; they’re the odd bits before a function definition that begin with ‘@’, e.g.: [python] def decorator(fn): def inner(n): return fn(n) + 1 return inner @decorator def f(n): return n + 1 [/python] Note the function called decorator; it takes a function as […]

Read More

Select a random item from a list/tuple/data stucture in Python

One of the most common tasks that requires random action is selecting one item from a group, be it a character from a string, unicode, or buffer, a byte from a bytearray, or an item from a list, tuple, set, or xrange. It’s also common to want a sample of more than one item. Don’t […]

Read More

Overview of Python GUI development (Hello World)

Python is well suited for rapid development of cross-platform applications of all sorts, and that includes desktop GUI apps. There are choices to be made when starting to develop a GUI application in Python, however, and this article provides the information you need to set out on the right path. We will discuss what serious […]

Read More