If you haven’t heard the news, Dave Beazley and I have officially begun work on the next edition of the Python Cookbook, which will be completely overhauled using absolutely nothing but Python 3. Yay! Right now, I’m going through some string formatting recipes from the 2nd edition to see if they still work, and if…
Category: Scripting
The Makings of a Great Python Cookbook Recipe
I’ve seen some comments on Twitter, Buzz, Reddit, and elsewhere, and we’ve gotten some suggestions for recipes already via email (thanks!), and both Dave and I thought it’d be good to present a simple-to-follow ‘meta-recipe’; a recipe for making a great recipe that has a good shot at making it into the cookbook. So let’s…
Good Things Come in Threes: Python Cookbook, Third Edition
It became official earlier today that David Beazley and myself will be co-editing/co-curating the next edition (the Third Edition) of the Python Cookbook. That’s really exciting. Here’s why: It’s Python 3, Cover to Cover Go big or go home. The third edition will be a Python 3 Cookbook. This by itself makes this a rather…
Nose and Coverage.py Reporting in Hudson
I like Hudson. Sure, it’s written in Java, but let’s be honest, it kinda rocks. If you’re a Java developer, it’s admittedly worlds better because it integrates with seemingly every Java development tool out there, but we can do some cool things in Python too, and I thought I’d share a really simple setup to…
Number Spiral Fun
I love puzzles, and I came across the Oblong Number Spiral challenge on Code Golf over the past week and dove in. Here’s the basic idea, from the challenge at Code Golf: This challenge involves you having to create a number spiral such as : 1 2 3 10 11 4 9 12 5 8…
Wonky Bunny Issue “Fixed”
For those who don’t know what the headline means: Bunny is an open source command line utility written in Python that provides a shell for talking to and testing AMQP brokers (tested on RabbitMQ). AMQP is a queuing protocol. It’s defined as a binary wire-level protocol as well as a command set. The spec also…
Python Date Manipulation
This post is the result of some head-scratching and note taking I did for a reporting project I undertook recently. It’s not a complete rundown of Python date manipulation, but hopefully the post (and hopefully the comments) will help you and maybe me too 🙂 The head-scratching is related to the fact that there are…
Brain Fried Over NoSQL
So, I’m working on a pet project. It’s in stealth mode. Just kidding — I don’t believe in stealth mode 😉 It’s a twitter analytics dashboard that actually does useful things with the mountains of data available from the various Twitter APIs. I’m writing it in Python using Tornado. Here’s the first mockup I ever…
Python IDE Frustration
I didn’t think I was looking for a lot in an IDE. Turns out what I want is impossibly hard to find. In the past 6 months I’ve tried (or tried to try): Komodo Edit Eclipse w/ PyDev PyCharm (from the first EAP build to… yesterday) Wingware Textmate Wingware First, let’s get Wingware out of…
PyTPMOTW: PsycoPG2
What is this module for? Interacting with a PostgreSQL database in Python. What is PostgreSQL? PostgreSQL is an open source relational database product. It has some more advanced features, like built-in networking-related and GIS-related datatypes, the ability to script stored functions in multiple languages (including Python), etc. If you have never heard of PostgreSQL, get…