Thursday, January 24, 2008

Chicago

CODE Hacker for the World,
Programming Tool Maker, Stacker of w00t,
Player with Rails and the Nation's Error Handler,
SourceForge, Cheese Shop, CPAN,
City of the Big Dynamic Language Conferences:...

I just found out that Chicago, after hosting PyCon in March, will host YAPC::NA in June, and hosted RailsConf in 2006. Crazy!

Dave Barry's Only Travel Guide You'll Ever Need makes a joke that every single state claims to be "dynamic". Looks like they all lose to Chicago, though, because that's where the real dynamic types come to play.

Sunday, January 13, 2008

brilliant PyCon publicity ideas

I was alarmed to find that many of the attendees at CodeMash didn't know that PyCon 2008 will be in Chicago - right here in our beloved Midwest.

So, as volunteer publicity coordinator, I thought I should brainstorm on more ways to get the word out. Here's what I've come up with so far.
  • National "got whitespace?" skywriting campaign
  • Spread urban legend about programmer whose kidneys are stolen by organ smugglers when he fails to attend PyCon
  • Invite presidential candidates to debate their choice of Python web framework at PyCon
  • Post hilarious "DO NOT WANT STATIC MANIFEST TYPING!!1!" pic at icanhascheezburger
  • Vote Guido into final round of American Idol
  • Bribe fortune cookie factory employee to replace fortunes with "PYCON 2008 CHICAGO IN BED"
  • Use laser to engrave giant announcement in the moon's surface
  • JEN IN TEARS AFTER ANGELINA'S LIGHTNING TALK
Please supply more ideas in the comments... (serious ideas doubly welcome!)

CodeMash slides

Thanks, everybody, for another great CodeMash - even better than last year! More babbling about it will follow when I have time,

As promised, the material from my presentation. It's almost identical to my LinuxFest presentation of last September.

Saturday, January 05, 2008

Introducing cmd2

cmd is a Python Standard Library module for constructing command-prompt applications. It's very easy to use - just subclass its Cmd type, create an instance, and call that instance's .cmdloop(). To support a command, just write a do_yourcommandname(self, arg) method within your Cmd instance.

cmd is also very bare-bones. It forms the backbone of sqlpython, and while improving that package, I've created cmd2. cmd2 is an extension for cmd that adds helpful functionality without requiring any changes to cmd-based applications.
  • Searchable command history
  • Load commands from file, save to file, edit commands in file
  • Multi-line commands
  • Case-insensitive commands
  • Special-character shortcut commands (beyond cmd's "@" and "!")
  • Settable environment parameters
  • Parsing commands with flags

I've found several alternatives to cmd in the Cheese Shop - CmdLoop, cly, CMdO, and pycopia. cly looks wonderful, but I haven't been able to get it working under Windows, and that's a show-stopper for many potential sqlpython users. In any case, none of the alternatives are based on cmd - they're written from scratch, which means that a cmd-based app would need complete rewriting to use them. I like sticking close to the Standard Library whenever possible. cmd2 lets you do that.

Switching a cmd application to cmd2 is as simple as changing from from cmd import Cmd to from cmd2 import Cmd, and the new functionality is ready to go. See a usage example of cmd2.

It's in the Cheese Shop, so you can easy_install cmd2. (Cheese Shop page for cmd2)

Thursday, January 03, 2008

Geek Event Aggregator code

I've told several people that I would post the code for the Geek Event Aggregator "as soon as I get it cleaned up".

Today, I swallowed my pride and admitted that I've really got to post something - that the much-needed code cleanup isn't going to happen for months. So, I created a page for it at Google Code: http://code.google.com/p/whatwhenwhere/

Not that you want to do that. It's ugly. Really. It will be cleaned up someday, but if you really want to make use of it now, there it is.

I decided to name the project "whatwhenwhere" because the code might well be used to aggregate events that are not at all geeky, and to host it at Google Code because, well, I'd never tried it.

Most of the stuff you might be conceivably interested in is in scan.py, ship.py, and events/model.py.