Archive for April, 2006

Tuples and lists

Saturday, April 29th, 2006

James Tauber reminds us that Python tuples are not just constant lists.

Via: Ned Batchelder

Another Python wiki

Saturday, April 29th, 2006

Effbot announces another Python wiki, this time it’s a Python Reference Wiki. For reference, the other two are a Tutorial Wiki and a FAQ Wiki.

Webhosts and Ruby on Rails

Friday, April 28th, 2006

Hrm… it seems like webhosts are starting to support Ruby on Rails. First (well, not “first” but you know what I mean) GoDaddy, and now stories like this:

I can finally start developing for Ruby on Rails. Mmm. I picked up the second edition of the PickAxe book from the library and have been reading through it. Blocks are pretty darn cool. For the past couple of weeks I’ve been reading up on Python, and I’m pleased to find that most of the cool things that I like about Python are in Ruby.

Is it possible that the Python community missed the boat on this one?

Yet another Python IDE

Thursday, April 27th, 2006

This one is called IronEdit and “strives to be the all-in-one, but not-so-bloated IDE for Python.”

I still prefer my free copy of Komodo.

Versions and release candidates

Thursday, April 27th, 2006

Kevin Dangoor wonders what is a “release candidate”?

Quoth Kevin:

I do have a bit of a pet peeve with the way a number of projects use the term “release candidate” (often appearing as “rc” in version numbers).

Monkey with “alpha”, “beta” and “gamma” releases all you want, but at least recognize “rc” for what it is because it’s just plain English.

Heh. If you are involved in public software releases, read the whole thing.

HOWTO: SNMP on Windows

Wednesday, April 26th, 2006

I’ve been playing with Cacti this week. The project has come a long way from when I first started using it, and I would now consider it one of the most powerful (free) monitoring/graphing packages currently available.

So tonight, now that all my Linux boxen are being monitored, I wanted to add my single Windows box. It turns out there is a SNMP component included in Windows 2000, you just need to install it. Here’s how to do it.

1. Find your Windows 2000 install CD. You’ll need it.

2. Start, Settings, Control Panel, Add/Remove Programs, Add/Remove Windows Components

3. Select Management and Monitoring Tools

Management and Monitoring Tools

4. Hit Details, and check the box for Simple Network Management Protocol

SNMP

5. Hit OK and Next, and walk through the installation wizard.

That’s it. Add the box as a new host device in Cacti using the Windows 2000/XP SNMP template and you are all set. Gotta love those pretty rrdtool graphs!

Tab autocompletion in Windows

Wednesday, April 26th, 2006

Now that I’m doing quite a bit of my Python work in Windows, I’ve been forced to use the cmd.exe shell. I’m used to using Bash, usually though PuTTY, so it’s not an easy or pleasant transition for me. One of the reasons is that by default Windows doesn’t have any command autocompletion by tapping the tab key. I could have sworn it used to work, but I guess not. Either way, it’s just silly to have to type out the huge filenames.

Well tonight I downloaded Tweak UI 1.33 (works fine in Windows 2000) and found out that you can indeed enable autocompletion:

Tweak UI

Set both of those to “Tab” and you are all set. Not bad.

Django API changes before 1.0

Wednesday, April 26th, 2006

Matt Michie is waiting for Python web frameworks, and mentions the changes in the Django project:

Unfortunately, I started coding in Django right before the “magic” removal branch went public. The documentation didn’t mention anything about a massive API change that seems to require lots of changes to any code you write. Not that it is too important to me, it will be faster for me to start over and move the methods into the new branch. Still frustrating.

I guess it could have been made more clear on the front page, but the documentation and FAQ are pretty explicit that the API can/will change quite a bit before 1.0 is released. But I do see how it could be frustrating if you missed that.

Awesome by a thousand papercuts

Wednesday, April 26th, 2006

Chris McAvoy stands by his earlier claim that Django hates magic and that the “magic-removal” branch makes him “think that Django is explaining the card trick, or killing Harry Potter, or burning down Disneyworld.” Heh.

That said, his latest post makes it sound like there are some really nice improvements in the branch:

Sure, they seem like trivial changes, but I’m pretty sure significant work went into making the API more intuitive. Any one change doesn’t make Django hugely better, but taken as a whole it’s awesome by a thousand papercuts.

Indeed.

Managing your iPod with Python

Wednesday, April 26th, 2006

Libipod is a C library with associated Python wrappers to help you manage your iPod. Documentation is sparse, but there are a few examples given.