Tabnanny really useful?

Franz Steinhaeusler franz.steinhaeusler at
Tue Dec 21 15:21:48 CET 2004

On Tue, 21 Dec 2004 08:36:31 -0500, Steve Holden <steve at>

>Franz Steinhaeusler wrote:
>> Oh sorry, I meant
>> def a():
>> ->print
>> ..->print
>> C:\Python23\Lib> -v c:\
>> 'c:\\': *** Line 3: trouble in tab city! ***
>> offending line: ' \tprint\n'
>> indent not equal e.g. at tab size 1
>> C:\Python23\Lib>python -c "print repr(open('c:/').read())"
>> 'def a():\n\tprint\n \tprint\n'
>> C:\Python23\Lib>c:/
>> C:\Python23\Lib>
>Well, you've probably answered your own question, then. Do you think 
>tabnanny is a useful piece of code now? 

Not really soo useful, because most syntax and also indentation errors
are actually detected by invoking python, i.e. the command compile.
But as combination for this: yes why not.
I looked for Stanis spe editor, which uses a combination of these two.

The background is:

I'm a member of the wxPython project Drpython (Python text editor 
and much more), and wanted also check the usefulness of a kind of syntax
check, which should run, before saving a Python file.
PythonCard Codeeditor also uses tabnanny, as far as i can remember.


Franz Steinhaeusler

More information about the Python-list mailing list