Building better and more efficient Python scripts

Python Tricks


Save time and trouble with these expert techniques for building custom Python tools.

By Joe Casad

Linux users can automate almost any task, but whether the automation is worth your time depends on how much time you have to spend on it. The easier and more efficient the language, the greater the variety of tasks you can cost-effectively automate. Linux offers a dizzying array of scripting alternatives, but a favorite for many users is the powerful and practical Python. This month's cover story examines Python in the Linux environment.

Our cover story starts with a look at how to start creating your own practical Python scripts. In the lead article, "Hello, Python: Getting started with Python in Linux," expert sys admin Æleen Frisch, author of the perennial O'Reilly bestseller Essential System Administration, explores the Python language through a series of well-annotated examples.

Other articles this month address users who already know about Python and are looking to extend and expand their skills. Our second article, "Running Lean: Optimizing Python Scripts," describes some coding techniques for writing faster scripts. We also look at the Stackless Python extension, which provides an architecture for developing reusable, high-performance routines that build in the benefits of dynamic heap access. Finally, in our Reviews section, we offer a comparison of Python integrated development environments, including Wing IDE, Boa Constructor, DrPython, Eric, and Idle.

Whether you are a Python novice or an experienced Python developer, you'll find something to keep in this month's Python Tricks cover story.