There are several static analysis tools that can check whether a variable name is used before it is defined.
At my old workplace we used "pylint", so I can recommend that: http://www.logilab.org/857 --Daniel
-- http://mail.python.org/mailman/listinfo/python-list