Tabnanny really useful?

Steve Holden steve at holdenweb.com
Tue Dec 21 09:34:47 EST 2004


Franz Steinhaeusler wrote:

> On Tue, 21 Dec 2004 08:36:31 -0500, Steve Holden <steve at holdenweb.com>
> wrote:
> 
> 
>>Franz Steinhaeusler wrote:
>>
>>[...]
>>
>>>Oh sorry, I meant
>>>def a():
>>>->print
>>>..->print
>>>
>>>C:\Python23\Lib>tabnanny.py -v c:\franz.py
>>>'c:\\franz.py': *** 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:/franz.py').read())"
>>>'def a():\n\tprint\n \tprint\n'
>>>
>>>C:\Python23\Lib>c:/franz.py
>>>
>>>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.
> 
> 
>>[...]
> 
> 
> regards

I've used drpython, and liked it. I think it would be a good way for 
people to start to use the language, as it avoids the "just the command 
line" syndrome without being as complex as IDLE or PythonWin. In short, 
just about right for a beginner.

regards
  Steve
-- 
Steve Holden               http://www.holdenweb.com/
Python Web Programming  http://pydish.holdenweb.com/
Holden Web LLC      +1 703 861 4237  +1 800 494 3119



More information about the Python-list mailing list