Aaaargh! "global name 'eggz' is not defined"

Fabio Zadrozny fabiofz at gmail.com
Fri Oct 30 16:02:40 EDT 2009


On Thu, Oct 29, 2009 at 6:48 PM, kj <no.email at please.post> wrote:
>
> How can one check that a Python script is lexically correct?
>
> As my Python apps grow in complexity and execution, I'm finding it
> more often the situation in which a program dies after a lengthy
> (i.e. expensive) run because the execution reaches, say, a typo.
> Of course, this typo needs to be fixed, but I'd like to find out
> about it before I waste hours on a run that is bound to fail.  Is
> there any way to do this?  I imagine the answer is no, because
> given Python's scoping rules, the interpreter can't know about
> these things at compile time, but I thought I'd ask.
>

Pydev has a code-analysis feature which works analyzing the code while
you're typing. See: http://pydev.org/manual_adv_code_analysis.html

Cheers,

Fabio



More information about the Python-list mailing list