Archive for November, 2005

Django vs. TurboGears

Wednesday, November 30th, 2005

It seems that it is almost impossible to talk about one web framework (be it Django, TurboGears, or Ruby on Rails) without drawing some comparisons and talking about which one is best.

That is certainly the case when Ben pulls no punches in Django is Rails:

The Django Project kicks the living crap out of Turbo Gears for python web application development. I went through the tutorials and documentation from both projects; messed around with writing up some toy applications. I have to say that I’d choose Django for my work.

Heh.

Update: Ben now assures us that he is not a Django fanboy, he’s just really really excited about web frameworks. :)

Problems resolved

Wednesday, November 30th, 2005

Hopfully this will be my last post related to my previously broken Django install.

As per Adrian’s suggestions (see comments), I looked for any .pyc files in the Django and removed them as follows:

metis# cd /usr/local/django/django_src/django metis# find -name "*.pyc" | xargs rm
Python scripts get compiled into bytecode (.pyc) files when they are run, but these files are not managed by SVN. So that can cause problems when performing updates.

Unfortunately, however, this did not fix my problem…

(more…)

Preparing for winter

Wednesday, November 30th, 2005

For those of who you have never had the experience of driving 2WD light truck around in a Pennsylvania winter, let me just say that you are missing out on some excitement. Because when I say “drive” I mean that only in the most broad sense of the term. It’s more like “aim in a general direction and hope for the best” rather than “drive.”

So this year I have decided to buy some true snow tires and see if that helps. I ended up ordering four Bridgestone Blizzak WS-50s (photo) from Tire Rack on Monday, and they arrived today. Now I need to stop by NTB and pick up some cheap 215/65-15 black steel wheels and get them mounted.

With snow tires and a snow blower at the ready, I’m sure there will be barely a flurry for the rest of winter. You can thank me later.

Django error followup

Tuesday, November 29th, 2005

Yesterday I wrote a quick post about breaking my Django install and didn’t think much of it.

So it was quite a surprise for me to get a comment from Adrian Holovaty, Django developer! He asked for some details on the errors I was getting, so I’ll try my best to explain exactly what the errors are and how they were generated…

(more…)

Screen Grab!

Tuesday, November 29th, 2005

While hunting for an application to take full-length screenshots of a websites (i.e. not just the visible window, the whole thing), someone suggested Screen Grab. It’s a extension for Firefox that uses Java, and apparently does everything I want.

I installed it this evening and it seems to work perfectly. It adds three options to the right-click context menu for a given page including “Save document as image…” which saves the current webpage to a png.

As an example, here’s a full-length screenshot my site (resized) using the extension. There are some more examples on the project homepage.

Simple enough, and works well. I like it!

Broken Django

Monday, November 28th, 2005

metis# cd /usr/local/django/django_src metis# svn update
And with those two lines, I somehow broke my Django installation on my Linux box.

Before breaking everything, I had worked through most of the tutorial and was actually starting to get the hang of the framework. Now I’m getting list index out of range errors. Very odd.

I’m so new to both Python and Django that I think my best bet might be to delete everything and start over. It might actually be a good thing to run through the first half of the tutorial a second time.

Kibot

Sunday, November 27th, 2005

Some of the Linux geeks at Duke put together what appears to be rather cool IRC bot implementation in Python:

Kibot is a python-based IRC bot written to be cleanly and robustly modular, powerful and flexible. It has a rich permissions framework, and writing modules/commands for it is ridiculously simple.

In the past I’ve looked at python-irclib and wasn’t impressed, mostly due to the lack of real documentation. I’m sure Twisted would be a great way to go, but for someone who is new to Python like me it seems a little… involved.

Perhaps Kibot will be a good intro to IRC programming. Any description that includes the words “ridiculously simple” sounds good to me.

Sudoku

Saturday, November 26th, 2005

I’ve been reading about Sudoku and it sounds like an interesting puzzle. I’ll let Wikipedia explain how it works:

The aim of the canonical puzzle is to enter a numerical digit from 1 through 9 in each cell of a 9×9 grid made up of 3×3 subgrids (called “regions”), starting with various digits given in some cells (the “givens”). Each row, column, and region must contain only one instance of each numeral.

Before this year I had never even heard of Sudoku, now it seems to be everywhere I look… the New York Times, Amazon, and even Freshmeat.

Funny how random things become popular so quickly.

Update: Well, I just completed my first Sudoku. I finished an easy one at Web Sudoku (highly recommended) in exactly 15 minutes. Not a bad little puzzle.

Update 2: Be sure to check out Python Sudoku.

Simon’s introduction to Django

Saturday, November 26th, 2005

At the risk of repeating everything already posted at the Django Weblog, I think it’s worth noting that Simon Willison has made his Introduction to Django presentaion slides available online (pdf) .

Also, as someone who gives the occasional talk at my local LUG, Simon’s public speaking tips are definitely worth reading. Specifically, his advice to “Show, don’t tell.” (i.e. use demos) is good advice indeed. I’ll try to implement some of his suggestions next time I give a presentation.

Comp.lang.python podcast

Friday, November 25th, 2005

Davy Mitchell is asking for feedback on a comp.lang.python podcast demo that he recently created. When I first read his post, I was pretty excited about another Python podcast being added to the mix (Python411 being the other one). But after a quick listen, I discovered it was put together with text-to-speech… ugh!

Perhaps others will disagree, but I think it is absolutely unlistenable. I think I’d rather listen to somone stuttering through lines and popping their P’s on a cheap mic than have to endure a fake female voice saying “aich tee tee pee colon slash slash double you double you double you dot….”

Great idea and interesting hack, but I’d have to give this one a thumbs down.

Update: Davy bought a USB mic and might try doing a real Python podcast. I’d imagine there are quite a few Pythonistas who’d love to listen in.